Message Boards Message Boards

0
|
4749 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Can anyone eliminate my errors, with my graphic at start up!

Posted 10 years ago
Hi
I am new to Mathematica and for some unknown reason I can not get my code pasted into the box with the Mathematica symbol.

I have pasted some of the code below but it does no look clear, so I have attached my entire notebook.

If you go to the first graphic   in my notebook : -     Static frames of 'APE'



When you first use it , it has errors, but when you evaluate it, it works fine. 
Can anyone get rid of the errors, and end up with the same end result?

Mr Andrew Pepes

A[\[Phi]_, \[Psi]_, \_] = RotationMatrix[\[Pi] - \, {0, 0, 1}].RotationMatrix[\[Psi], {1, 0, 0}].RotationMatrix[\[Pi] - \[Phi], {0, 0, 1}];
fin1[k_] = Table[N@A[0, i*k 2 Pi/n, (-i*2 Pi/n) + Pi/2].{0, 1, 0} + 2 {Cos[i*2 Pi/n], Sin[i*2 Pi/n], 0}, {i, 360}];
n = 360; (* number of beads on toroid *)
Manipulate[ Graphics3D[{{Hue[ 0.17], {Sphere[#, (0.01 + k/100)], Hue[0.3], Sphere[{0, 0, 0}, (.04 + k/200)]} & /@ Take[fin1[k]]}},  Boxed -> False, ViewAngle -> Pi/16, SphericalRegion -> False, PlotRange -> {{-6.5, 6.5}, {-4.5 - k, 4.5 + k}, {-6, 6}}], {{k, 0,    "k rotations in plane"}, {0, 4, 8, 16, 32, 64},   SaveDefinitions -> True}]


PS The same happens to the third graphic under : -    More details.
and if you are up to it, how can I get the last graphic to stay central while spinning, I want the graphic to spin and not the box that contains it!

Many thanks to all that can help, before I ask for more complicated help. I desire to eventually simulate a multidimensional entity into one dynamic graphic.
Attachments:
POSTED BY: Andrew Pepes
2 Replies
Posted 10 years ago
hello, Andrew, maybe the error in your function A is the lack of the two points, I made that change and could plot the 3D objects in the image, I show the change I made and the picture, the rest of your theme, not to my scope of knowledge, I hope I have helped somewhat. regards

POSTED BY: Luis Ledesma
Posted 10 years ago
Hi Luis

Thank you for your attempt. But it did not solve my problem.
Once you evaluate it, it always works and produces the images. 

The real problem is that once you quit the mathematica (kernal) and then reload the file, it has the error, which disappears again once evaluated.

What I need is for the initial error to disappear, so that I can save it as a .cdf file. Then everyone will be able to see it without the mathematica program.

Regards
Andrew Pepes.
PS you were partly correct, but I needed to do an Iniialization as below inside the Manipulate before SaveDefinitions.

Initialization :> {n = 360
POSTED BY: Andrew Pepes
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