POV-Ray : Newsgroups : povray.general : Making shell : Re: Making shell Server Time
3 Aug 2024 12:13:55 EDT (-0400)
  Re: Making shell  
From: Hughes, B 
Date: 23 Feb 2004 21:37:23
Message: <403ab8e3$1@news.povray.org>
"bobby" <bob### [at] club-internetfr> wrote in message
news:403a713f@news.povray.org...
>
> I wish informations to build some shells with povray 3.5 .
> Have you some examples ? Some equations ?


I know there have been some made, just not sure where to find them without a
search.

Perhaps one thing that might be useful for creating shells is at Mike
William's Isosurface Tutorial, the Realistic Surfaces link. It could be
changed in various ways if you can manage to manipulate it.
http://www.econym.demon.co.uk/isotut/index.htm

Equations are another matter. I adapted the little C program I found at
http://www.notam02.no/~oyvindha/loga.html to plot out points of shells:


/* plot points for a shell */
#macro SeaShell(PC,RA,UF,RV,IT,TS)
// #local PC=1000;
// #local RA=20;
// #local UF=0.09;
// #local RV=0.33;
// #local IT=49; // minor radius plot count
// #local TS=0.2;
union {
#local i=0;
#while (i<PC)
    #local theta=i/RA;         /* Rotation angle */
    #local r=exp(theta*UF);   /* Distance from axis (UF is uncoiling factor)
*/
    #local d=RV*r; /* Radius relative to r (involute/evolute) */
                         /* For ornament, add a periodic function to d */
    #local j=0;
    #while (j<IT+1)
      #local phi=2*pi*j/IT;
      #local X=d*cos(phi)*cos(theta);
      #local Y=d*cos(phi)*sin(theta);
      #local Z=d*sin(phi);
      #local X=X+r*cos(theta);
      #local Y=Y+r*sin(theta);
      #local Z=Z+r*TS;         /* Trochospiral factor */
      sphere {<X,Y,Z>,0.05 pigment {rgb 1}}
#local j=j+1;
#end
#local i=i+1;
#end
scale 0.25
rotate 90*x
translate 3*y
}
#end

SeaShell(500,30,0.08,1.0,25,4.0)

Of the web pages I've seen, they use various equations written differently.
Unfortunately, math isn't a real strong point for me. Also, have a look at
http://www.dynabits.com/sw/free/macros/mathsurf/gallery/seashell.htm .
However, you might not need to go any further than the Isosurface Tutorial
and tweak that example unless you're looking to convert other equations to
POV-Ray.

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

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