Group Abstract Group Abstract

Message Boards Message Boards

Seeking 3D rendering of 2D Lissajous curve

Posted 3 years ago
POSTED BY: Dave K
9 Replies
Posted 3 years ago
POSTED BY: Eric Rimbey
Posted 3 years ago
POSTED BY: Eric Rimbey
Posted 3 years ago
POSTED BY: Eric Rimbey
Posted 3 years ago

Thanks for this amazing reply!

At the risk of fearing that I'm wasting your valuable expertise on a newbie question, I'm not clear on where to apply this code in Mathematica. I tried:

File > New > Package/Script > WolframScript Script

and then pasted the contents in and pressed "Run All Code", but nothing happens. I realize the "right" approach here would be to start from the ground up and learn Mathematica, but if you can quick-start me, then I may be able to pull this off...!

Thanks in advance!

POSTED BY: Dave K
Posted 3 years ago

Oh, sorry, I assumed too much.

If you're running Mathematica, you can just open a new notebook (File -> New -> Notebook). Copy the Lissajous3D code above, and paste it into the notebook. What you should have at that point is an Input cell. You'll see a bracket at the right side. With the cursor anywhere in that cell, tap Shift+Return. It won't produce any output, but it will have evaluated that code so that Lissajous3D is available to use like any other function. The cursor should now be below that cell. You can also just click anywhere in the whitespace below the cell to make sure. Now copy the whole ParametricPlot3D expression. Paste it into your Mathematica notebook. Again, with the cursor anywhere in this new cell, tap Shift+Return. This time it should output the plot, and it should look like the picture I pasted above. You can now tweak things in the ParametricPlot3D cell (don't need a new cell), and Shift+Return again.You can also tweak the Lissajous3D definition and Shift+Return that cell, and the next time you Shift+Return the ParametricPlot3D cell, it will use the updated definition.

POSTED BY: Eric Rimbey
Posted 3 years ago
Attachments:
POSTED BY: Dave K
Posted 3 years ago
POSTED BY: Eric Rimbey
Posted 3 years ago

First of all, THANKS AGAIN!

I had tried varying "w" through a bunch of values, and only ever got one "loop" at the top. But I guess I didn't try the right values!

I tried what you said, and it got me my vertical/horizontal nodes. I've attached my latest version, for the record. With that working, I'm going to go back to your original color and perspective parameters, and see how close I can get to the "3D" effect I was looking for.

Then I'll report back!

Attachments:
POSTED BY: Dave K
Posted 3 years ago

Okay, my apologies. I figured it out. There was no output because I had not pasted the Lissajous function definition in. After I did that (ahead of the other code) and then pressed shift-ENTER, I got the plot.

Progress! lol.

Let me try to experiment with this and get back to you.

Thanks!

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