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

Automatic tube width calculation #2

Closed
kig opened this issue May 28, 2018 · 1 comment
Closed

Automatic tube width calculation #2

kig opened this issue May 28, 2018 · 1 comment

Comments

@kig
Copy link
Collaborator

kig commented May 28, 2018

Now the tubes require an explicit width param to set their scale. It'd be better if you could scale the tube width automatically so that the widest radius of a tube doesn't overlap other tubes on the starting positions grid.

How to do? When building the tubes, keep track of the max divergence encountered, use that to calculate the divergence scaling factor. Radius = divergence/maxDivergence would get you radius of 1 for max divergence. Multiply that by the minimum distance between starting grid positions to get a tube where the max radius touches the next starting position. Further halve the scale and adjacent max radius tubes wouldn't overlap. Scale = 0.5 * minDistance * divergence / maxDivergence.

@kig kig closed this as completed in 97c89d7 May 29, 2018
@etpinard
Copy link
Member

Quick question for you @kig : what happens to the default tubeSize on divergence-less vector fields (e.g. solenoidal fields)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants