Message Boards Message Boards

1
|
7270 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Animation problem?

I have a data then I do Interpolation. Omega[t] is my function, then I animate, is working fine,but a Integrate Omega[t],animation did not work.Why? My 3D object not spinning.

Attachments:
POSTED BY: Mariusz Iwaniuk
2 Replies

Ok. It's works. Thanks. :)

POSTED BY: Mariusz Iwaniuk

How's this?

OmegaIntegrate = Evaluate@Integrate[Omega[a], a]

Animate[Graphics3D[{Cuboid[{-20, -20, -1.01}, {20, 20, -1}], 
   GeometricTransformation[{Green, 
     Tube[{{0, 0, 0}, {0, 0, 0.15}}, {1.25, 0}], 
     Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1/4], Blue, 
     Cylinder[{{0, 0, 0}, {0, 1, 0}}, 1/4]}, 
    RotationTransform[Block[{a = t}, OmegaIntegrate], {0, 0, 1}]]}, 
  Boxed -> False, SphericalRegion -> True, PlotRange -> 3, 
  PlotRange -> 3], {t, 1, 10, 0.04}, AnimationRunning -> False, 
 SaveDefinitions -> True]

Since you defined OmegaIntegrate as a variable, you can't call it as a function. You have to use Block to define the value of t to use.

I changed t to a in OmegaIntegrate because Block[{t=t},...] wouldn't work.

POSTED BY: Jesse Friedman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract