Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector field options with the arrows above and in a single color #278

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

najlkin
Copy link

@najlkin najlkin commented Mar 13, 2024

This PR adds two options for visualization of vector fields. They are similar to the options 2 and 3, but the arrows are drawn above the function surface and in a single color (the first in the palette) instead of the placement on the mid-plane with colors following the values. The main purpose is visualization of 2D data, where the current options for visualization of vector fields draw arrows, which are partially hidden behind the surface and the arrows blend with the background when looking from top.

example 5:
option 4:
image
option 5:
image

@najlkin najlkin self-assigned this Mar 13, 2024
@@ -844,7 +844,7 @@ thread_local double new_maxlen;
void VisualizationSceneVector::DrawVector(double px, double py, double vx,
double vy, double cval)
{
double zc = 0.5*(bb.z[0]+bb.z[1]);
double zc = (drawvector > 3)?(bb.z[1]):(0.5*(bb.z[0]+bb.z[1]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of additional options for v, maybe it is better to add an input option lambda (by default 0.5) that can adjust the zc value to (1-lambda)*bb.z[0]+ lambda*bb.z[1]?

This is similar to how we handle e.g. level lines with F5 or rules positions with ~

@tzanio tzanio requested review from mlstowell and v-dobrev May 26, 2024 22:02
@tzanio tzanio added this to the glvis-4.3 milestone May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants