|
|
Sphere function creates degenerate cylinders with Parametric() and CalcSurf()
left you stuck with one function:
V_vec_Arr[Ind]=<(Fx(U,V)),(Fy(U,V)),(Fz(U,V))>;
I give you spheroid_dome.inc
Prevent degenerate cylinders and make option for slice (u-mapping) loop
(j<=slices) to complete or not, point ends up where it started, pass functions
as parameters and do it all with one function.
// "Bohemian Dome"
#declare Vmin=0;
#declare Vmax=pi*2;
#declare Umin=0;
#declare Umax=pi*2;
#declare F_BDx = function(u,v) {3*cos(v)+1*sin(u)}
#declare F_BDy = function(u,v) {2*sin(v)}
#declare F_BDz = function(u,v) {1*cos(u)}
spheroid(1, 0.3, 0.0, 0.0, 20, 10,F_BDx,F_BDy,F_BDz,1)
// radius xyz-flats, stacks,slices,xyz-funcs, full slice(U) loop (0=reduced pnts
at tips, 1=straight longitude lines)
aobj(<0,0,0>,<0,0,0>,<0.9393,0.15928,0.41414>,0)
// rotate, translate, color, randomcolorfaces
//WriteMesh("bohemian_geometry.inc")
//sphere stacks
#declare Vmin=0;
#declare Vmax=pi;
//slices
#declare Umin=0;
#declare Umax=pi*2;
#declare Fx = function(u,v) { sin(u) * sin(v) }
#declare Fy = function(u,v) { cos(v) }
#declare Fz = function(u,v) { cos(u) * sin(v) }
spheroid(1, 0.0, -0.5, 0.0,10,16,Fx,Fy,Fz,0)
aobj(<0,0,0>,<0,0,0>,<0.9393,0.15928,0.41414>,1)
/*************** USING "full slice(U) loop" **************
Will inevitably try to create degenerate triangles and edges.
Errors handled and no edge is created, allowing render to proceed.
Where Behemian requires it, sphere func allows it.
********************************/
spheroid(1, 0.3, 0.0, 0.0, 20, 10,F_BDx,F_BDy,F_BDz,0) fails to complete
bohemianDome and a new, unintended creature is formed.
Post a reply to this message
Attachments:
Download 'spheroid_dome03.jpg' (135 KB)
Preview of image 'spheroid_dome03.jpg'
|
|