Thu, 08/15/2013 - 06:39 am
I'm struggling to try and find a way to generate a volume of revolution from a graph of a function f=y(x).
I'm wishing to generate a surface from rotating my function about the line X=500 (from graph attached) - then display on a Gizmo plot
Any help appreciated
THanks
Variable inr,rmax
Variable x2=inr/rmax
return sqrt(1-x2*x2)
End
I'd create a parametric surface of the desired resolution, e.g.,
•ddd[][][0]=p-50
•ddd[][][1]=q-50
•ddd[][][2]=fr(sqrt((p-50)^2+(q-50)^2),50)
Now create a new Gizmo and append a parametric surface. You can do so manually or simply execute the following recreation macro:
PauseUpdate; Silent 1 // Building Gizmo 6 window...
NewGizmo/N=Gizmo0/T="Gizmo0" /W=(536,44,1167,675)
ModifyGizmo startRecMacro
AppendToGizmo Surface=root:ddd,name=surface0
ModifyGizmo ModifyObject=surface0 property={ srcMode,4}
ModifyGizmo ModifyObject=surface0 property={ surfaceCTab,Rainbow}
ModifyGizmo setDisplayList=0, object=surface0
ModifyGizmo SETQUATERNION={0.571268,0.028073,0.091655,0.815146}
ModifyGizmo autoscaling=1
ModifyGizmo currentGroupObject=""
ModifyGizmo compile
ModifyGizmo endRecMacro
End
I hope this helps,
A.G.
WaveMetrics, Inc.
August 15, 2013 at 09:47 am - Permalink
variable rin, rmax
variable rho = rin/rmax
return (cos(2*pi*rho))^2
end
function show()
variable rmax =10
make/O/N=(90, 100, 3) wsurf
setscale/I x, 0, 2*pi,"" wsurf
setscale y, 0, rmax, "" wsurf
wsurf[][][0] = cos(x)* y
wsurf[][][1] = sin(x) * y
wsurf[][][2] = foo(y, rmax) // use this as
// a parametric surface for Gizmo
end
August 15, 2013 at 11:35 am - Permalink