POV-Ray : Newsgroups : povray.binaries.images : Not a Sphere (91K) : Not a Sphere (91K) Server Time
17 Aug 2024 12:14:49 EDT (-0400)
  Not a Sphere (91K)  
From: Zebu
Date: 1 Oct 2001 18:45:02
Message: <3bb8f1ee@news.povray.org>
Content-Transfer-Encoding: 8Bit



Found an interesting shape while trying to make a sphere... 



If there's a math guru out there who knows how to translate this code to 

make a sphere, don't hesitate  :-)



#declare Cx=-pi;

#declare Step=pi/30;

#while(Cx<pi)

 #declare Cy=-pi;

 #while(Cy<pi)

  box {<-.04,-.04,-.04>,<.04,.04,.04>

   texture { T_Gold_3C }

  rotate <degrees(Cx),degrees(Cy),00>

  translate <sin(Cx),cos(Cx)*(abs(Step-Cy))/2,sin(Cy)> }

 #declare Cy=Cy+Step;

 #end

#declare Cx=Cx+Step;

#end



-- 

+--------------------------------------------------------------+

 | http://pingou.linux-site.net/~zebu/      ( o<     =P.O.V=  |

 |                                          / /\     =Perl5=  |

 |    [ Spammers'll be eaten! ]             \V_/_    =Fsims=  |

+--------------------------------------------------------------+


Post a reply to this message


Attachments:
Download 'us-ascii' (126 KB)

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