File: hidden_compare.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,940 kB
  • sloc: ansic: 95,319; cpp: 7,590; makefile: 2,470; javascript: 2,328; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (40 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Compare hidden3d and pm3d methods for handling hidden surface removal

unset border
set dummy u, v
unset key
set view 225, 206, 1.25, 0.50
unset xtics
unset ytics
unset ztics
unset colorbox

set parametric
set dummy u,v
set urange [ -3.14159 : 3.14159 ] noreverse nowriteback
set vrange [ 0.250000 : 3.14159 ] noreverse nowriteback
set isosamples 50, 20

set multiplot layout 1,2 margins .05,.95,.2,.8 spacing 0.05

set title "hidden3d 2-color surface"
set hidden3d back offset 1

splot (cos(u)+.5*cos(u)*cos(v))*(1.+sin(11.*u)/10.), \
      (sin(u)+.5*sin(u)*cos(v))*(1.+sin(11.*u)/10.), \
      0.5*sin(v) with lines lt 3

set title "pm3d 2-color surface"
set pm3d depthorder
set pm3d interpolate 1,1 # border linecolor rgb "#a0a0f0"  linewidth 0.500
set pm3d lighting primary 0.33 specular 0.2 spec2 0.3
set isosamples 200,200

splot (cos(u)+.5*cos(u)*cos(v))*(1.+sin(11.*u)/10.), \
      (sin(u)+.5*sin(u)*cos(v))*(1.+sin(11.*u)/10.), \
      0.5*sin(v) with pm3d fc ls 3

unset multiplot

pause -1 "<return> to continue"
reset