Drawing Tracks with OpenGL or X3d

Hi,

I would like to know if it’s possible to draw tracks and animate them with OpenGL or X3D ?
When i load a file with tracks included, only the geometry is displayed.

The goal is to make an equivalent of this for example:

If it’s not implemented, is it possible to draw lines in 3d?

Laurent

Hi Laurent,

Lines can be drawn by using class TPolyLine3D, markers with TPolyMarker3D. They both support external viewers.

TGeoTrack only supports rendering via standard pad primitives, not in an external 3d viewer. Are TGeoTrack’s what you have for input?

I went through the code of TGeoManager and TGeoTrack that does the track painting and animation. It would take quite some effort to port it over to GL (or to a generic 3d-viewer interface). I’d also have to discuss it with Andrei (author of the TGeo package).

In principle we are interested in supporting this, but most likely not before autumn.

Best,
Matevz

Thanks for your reply,

yes, i use TGeoTrack to draw tracks. I will perhaps try to draw it with TPolyLine3D and TPolyMarker3D, as you said

:bulb:
Just some suggestions of useful things about tracks that are not implemented in ROOT and i had to do myself during my work experience:

[ul]
more flexibility with animateTracks

  • time control (first, previous, next, last, play …)
  • camera moving (not only automatic mode)
  • recording image by image in gif export (allows to zoom or move camera during animation)
  • time intervall between each image
  • speed of animation when recording in gif file

Filters

  • draw only tracks passing trough one volume or a sequence of volumes.
    (i’ve made it with a list containing lists of volumes)
  • to have the possibility to have personal attributes in TGeoTrack (particule type, energy, …) and have the possibility to make filters on these attributes, and view them interractively by right click.
    [/ul]

Best regards,
Laurent