POV-Ray : Newsgroups : povray.binaries.images : Making A Basketball (70kbu) : Re: Making A Basketball (70kbu) Server Time
18 Aug 2024 06:09:57 EDT (-0400)
  Re: Making A Basketball (70kbu)  
From: Wlodzimierz ABX Skiba
Date: 13 Jul 2001 10:54:52
Message: <3b4f0bbc@news.povray.org>
Alan Holding wrote in message <3b4d11fb@news.povray.org>...
> I'm doing a basketball based image at the moment, and decided to make the
> basketball using an isosurface.

I don't want negate your very good "little tutorial" but when I looked at your
pictures I imagined that it should be possible with one pass - basket pigment
available via functions{}. Just look at my example (MegaPOV needed). If anybody
wants write it as macro with parameter as width of distance beetween "circles"
on the ball - just do it and upload it somewhere on this server - unfortunatly I
have no time.

#declare A=30; // angle - from 0 to 90
#declare C=vrotate(z,y*A);// center of "circle" in 1/8 part
#declare Cx=C.x;#declare Cy=C.y;#declare Cz=C.z;
#declare M=vrotate(z,-x*45);// middle between centers of two "circles"
#declare RA=vdot(C,M);// radius of circle for ball's radius=1

#declare R=function{"R"}
#declare VDot=function{Cx*x+Cy*y+Cz*z}
#declare Basket8=function{if(VDot(x,y,z)-RA,0,1)}
#declare Basket4=function{if(y,Basket8(x,y,z),Basket8(x,-y,z))}
#declare Basket2=function{if(z,Basket4(x,y,z),Basket4(x,y,-z))}
#declare Basket1=function{if(x,Basket2(x,y,z),1-Basket2(-x,z,y))}
sphere{0 1 pigment{function{Basket1}}}

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message


Attachments:
Download 'ball.jpg' (19 KB)

Preview of image 'ball.jpg'
ball.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.