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

Process partial segments #31

Open
thorstenhater opened this issue Mar 25, 2021 · 1 comment
Open

Process partial segments #31

thorstenhater opened this issue Mar 25, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@thorstenhater
Copy link
Owner

thorstenhater commented Mar 25, 2021

arb::pwlin can return an arb::msegment{id, p', q'} describing a subsection of the 'original' segment (id, p, q) such that
p' = q + u(q - p) and q' = p + v(q - p) for u, v: [0, 1].

At the moment, the renderer just inspects the id and returns the full segment regardless of any points.

Idea

  1. Add a field f to all points in the renderer that is 0 on the proximal and 1 on the distal end. Ensure linear interpolation.
  2. Pass a pair (u, v) to each frustrum when rendering based on the fractions above. Ensure constant.
  3. In the fragment shader discard if not u < f < v.

Issues

  • Need to compute (u, v) from (p, q, p', q')
  • Quite wasteful; usually we will show full segments, but have added 4 floats to each point

See: NeuroML/NeuroML2#144

@thorstenhater
Copy link
Owner Author

The trivial case where u = 0 or v = 0 is fixed in master.

@thorstenhater thorstenhater added the enhancement New feature or request label Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant