Git Product home page Git Product logo

Comments (2)

envelope-chaos avatar envelope-chaos commented on June 13, 2024

Because the data is 3D volume, I display it in several slices (Image). So I use a TurntableCamera camera.

from vispy.

djhoese avatar djhoese commented on June 13, 2024
  1. Unfortunately, I don't think this is implemented and would need to be implemented in both the Python and shader code. The good news is it is probably something that can be copied from the MarkersVisual. The bad news is it might be annoyingly complicated because of the history of the MarkersVisual and handling of scaling (CC @brisvag).

  2. Skimming the code I don't think there is anything stopping this from working in the shader code. It looks like it is mostly the python code that is limiting this. Do you get an error when you try passing an array? My guess is this part of the code isn't happy:

@arrow_size.setter
def arrow_size(self, value):
if value is None:
self._arrow_size = 5.0
else:
if value <= 0.0:
raise ValueError("Arrow size should be greater than zero.")
self._arrow_size = value
self._arrows_changed = True

  1. If I remember correctly the 3D support for the ArrowsVisual is very much a hack. I believe it was written only for 2D space, someone wanted to use it in 3D, so the shader code was naively/easily updated to just not drop the third axis. This doesn't necessarily mean that everything will look good which I think is what's happening in your image in your third point. I'm not sure what can be done about it, but I think there is another issue very similar to this (can't find it right now). My guess is that the calculations for the orientation of the arrow results in a divide by 0 in one of the dimensions and things just get weird after that. See:

vec3 body = $transform(v2).xyz - $transform(v1).xyz;
v_orientation = (body / length(body));

from vispy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.