Plotting Interlocking Tori with Gnuplot

Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5314
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

Below is an example of how to generate 3D graphs with Gnuplot.
hidden2.2.png
And the following is the code that implements the plot.
  1. gnuplot> set terminal png truecolor nocrop enhanced size 450,320 font "arial,8"
  2. Terminal type set to 'pngcairo'
  3. Options are ' background "#ffffff" enhanced font "arial,8" fontscale 1.0 size 450, 320 '
  4. gnuplot> set output 'hidden2.2.png'
  5. gnuplot> unset border
  6. gnuplot> set dummy u, v
  7. gnuplot> set format cb "%.1f"
  8. gnuplot> unset key
  9. gnuplot> set parametric
  10.  
  11.     dummy variable is t for curves, u/v for surfaces
  12. gnuplot> set view 60, 30, 1.5, 0.9
  13. gnuplot> set isosamples 50, 20
  14. gnuplot> set size ratio 0 0.55,0.9
  15. gnuplot> set origin 0.4,0
  16. gnuplot> unset xtics
  17. gnuplot> unset ytics
  18. gnuplot> unset ztics
  19. gnuplot> set title "3D surface sorting posted at http://forums.tssfl.com"
  20. gnuplot> set urange [ -3.14159 : 3.14159 ] noreverse nowriteback
  21. gnuplot> set vrange [ -3.14159 : 3.14159 ] noreverse nowriteback
  22. gnuplot> set pm3d depthorder
  23. gnuplot> set colorbox user
  24. gnuplot> set colorbox vertical origin screen 0.9, 0.15, 0 size screen 0.02, 0.5, 0 front bdefault
  25. gnuplot> g(x,y) = sin(-sqrt((x+5)**2+(y-7)**2)*0.5)
  26. 3d, 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3dwith pm

0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5314
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#2

Here is another version of the plot:
Attachments
showcase.jpg
showcase.jpg (28.05 KiB) Viewed 936 times
showcase.jpg
showcase.jpg (28.05 KiB) Viewed 936 times
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply

Return to “Gnuplot, Maxima/XMaxima”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests