Animated graphics

Hello all!

I’m trying to make a specialized graphic within root. Previously in my X11 incarnations of this graphic I’ve used openGL to manifest this. It is a graphic for showing the roll, pitch and heading of a specific object, so imagine a 3-D drawing with RPH as input.

I’m thinking about using TGeoManager to impliment this within root. However, I thought it would be good to poll the community and see if there are better ways to do it. It appears that TGeoManager and TGeoRotation do much the same as calls to openGL. Is this true?

Does anyone have other suggestions about how to do this?

Regards,
Chris

Chris,

Use the TGeo classes to build your geometry and draw the top
level TGeoVolume or one of its sub-volumes via
volume->Draw(“ogl”)

This will invoke automatically the ROOT OpenGL viewer.
Try with the examples in the tutorials, eg geodemo.C

Rene

Hello Rene,
Thanks for the reply. Can I assume that underneath things are managed much the same as using GList?

If I wanted to put graphical text on a plot, is that implimented?

Chris

this is a simple approximation ::slight_smile:

Currently text is not supported in the GL viewer, but it will be.

The GL viewer is currently under development.
Richard Maunder will tell you more once he will be back from sky holidays next week.

Rene

Do you want something like this

star.bnl.gov/STAR/comp/vis/StarEvent.html

?

Or may be like that

star.bnl.gov/STAR/comp/vis/StarCollision.wmv

Just another example of the ROOT-generated animation

kunstfassade.de/webcam/index.html

Enjoy

[quote=“fine”]Or may be like that

star.bnl.gov/STAR/comp/vis/StarCollision.wmv[/quote]

Hello, Valeri.

Very impressive. But can I try working programm? And if yes, how? (I mean, what do I need to download and install ?)

root.bnl.gov/QtRoot/How2Install4Unix.html
with ROOT 4.00.08 for the time being (It will work with the new ROOT also, just a man-power issue :frowning:

The old ROOT 3D interfaces was removed a half year ago saddly :open_mouth: , and my scheduler did not contain any frame to play with the new one yet :astonished: :wink: .

[quote=“tpochep”][quote=“fine”]Or may be like that

star.bnl.gov/STAR/comp/vis/StarCollision.wmv[/quote]

Hello, Valeri.

Very impressive. But can I try working programm? And if yes, how? (I mean, what do I need to download and install ?)[/quote]
The fastest way (about 5 min) to try is to install from the Web the Windows binary
root.bnl.gov/QtRoot/downloads/root.4.00.08.exe
(one click InstallShield installation, no hassle)

The movie was captured from the screen with

creativesoftworx.com

and made up with the regular (free) Microsoft Movie Maker. The entire “production” took about 20 min from the requiest to do so till the uploaded file.

Very likelyone could avoid the “screen capture software” the way we did for StarEvent Web page star.bnl.gov/STAR/comp/vis/StarEvent.html but it might have taken more then 20 min.

[quote=“fine”]Just another example of the ROOT-generated animation

kunstfassade.de/webcam/index.html

Enjoy[/quote]

One can create the vector high resolution snapshot also but the file is huge > 3 Mgb :cry: and it takes time :blush: to write it out

Anyway just an extra option to choose from :unamused:

star.bnl.gov/STAR/comp/vis/StarEvent.pdf

Hello, Valeri.

Thank you very much, I’ll try it.

Hi Chris,

I have returned from holiday - so hopefully can shed more light on this…

It depends what you mean by your subject ‘animated graphics’ - do you want to:

i) Animated the camera (viewer) movement round objects fixed in 3D space.
ii) Animate the 3D objects themselves - move, rotate etc relative to each other.
iii) Both the above.
iv) How do you want to drive this animation - user interaction, captured motion replay, scripts etc?

You should be aware:

A. TGeoManager has no specific connection with OpenGL - it is a set of classes for constructing geometric hierarchies. This means it has some similar concepts - including pushing of matrices to set relative offsets of an object to its parent. It also has a fairly full set of primitive shapes - much more that you get with OpenGL + glu libraries.

So many things you could construct in OGL you could build in the TGeoManager classes and then view with the OGL viewer.

See rootgeom.C under $ROOTSYS/tutorials for an example. Note you will need to either modify the last line to

top->Draw(“ogl”);

or invoke the OGL viewer off the pad menu (View->View With->OpenGL)

B. TGeoManager deals with static geometries only - it has no concept of animating the components relative to one another.

C. The OGL viewer does not support animated objects yet - but will do so in the future. However these would not come from a TGeoManager hierarchy as above implies.

D. You can move the camera in the OGL viewer - currently this can only be achieved directly by a user - there is no facility to capture/keyframe the motion or drive it by a script - but we are likely to add this in the future.

Note also that the precise interaction is likely to change in the future - though this will add not remove functionality.

E. There is no support for text display in the OGL viewer currently (aside from very simple axes labels drawing over which you have no control). Again this is a likely future feature.

F. When you refer to ‘GList’ is your later mail - do you mean OpenGL display lists (glNewList glCallList calls etc). If so these are purely a OpenGL performance feature - they don’t alter what gets drawn as such - and TGeoManager has no connection at all with these.

Hope this clarifies things somewhat. If you can give a fuller description of what you want to achieve then I can advise further.

Best wishes

Thanks for the tutorial. I think I improperly used the animation concept. Most of what I want to do is static and then changes the camera view angle.

I modeled much of what I have done so far after the rootgeom.C example. Mostly I was trying to get a better understanding of what was benith the geometry package. Your note has provided a great deal of insight. Thank you.

On a side note, I did make something as a layered add on for doing scalable, rotatable text on a drawing. (Pretty sure HIGZ used to have something like this. ) I’ll try to make it neat enough so I can forward it to you for incorporation into root. I have never made something clean enough to live in the root tree, so there may be a bit of a learning curve.

Again, thank you very much for the description of the geometry package.

Regards,
Chris

star.bnl.gov/STAR/comp/vis/StarEvent.html

Forbidden
You don’t have permission to access /STAR/comp/vis/StarEvent.html on this server.

??

The same :laughing:
TOP SECRET!!!

Try again. May be something (afs for example) was down and the time.

OK. It’s better now.
Valeri F. is using so called “Client-Pull method” for animation.
Details are home.netscape.com/assist/net_sites/pushpull.html

Another way of animation is “push method”. Both methods can
be used along with Carrot web server.

Details are
carrot.cern.ch/CarrotExamples/pull.C.txt
carrot.cern.ch/CarrotExamples/push.C.txt

the examples
carrot.cern.ch/CarrotExamples/pull.C
carrot.cern.ch/CarrotExamples/push.C (only for netscape browsers)

Regards. Valeriy