POV-Ray : Newsgroups : povray.binaries.images : Spherical Products With Other Polar Functions [40 k] : Spherical Products With Other Polar Functions [40 k] Server Time
12 Aug 2024 19:28:57 EDT (-0400)
  Spherical Products With Other Polar Functions [40 k]  
From: David Matthews
Date: 18 Jul 2003 22:59:28
Message: <3F18B415.6010606@dinecollege.edu>
Thanks to the recent posting by Paul Bourke regarding super shapes 
extended to 3D via spherical products, 


http://members.home.nl/seedseven/, I put together something for my (fall 
semester) multi-variable calculus students, generalizing from super 
shapes to other polar curves.  I thought some POVRay users might be 
interested,  at least in the results.  A fun evening can be had by 
digging out an old analytic geometry book, or other source of polar 
curves, and crossing different famous curves in different orders (at 

POVRay users, but my students will be learning POVRay as we go, and thus 
be pretty much as ignorant as I am, regarding POVRay.  I did, at least, 
clip out the reminders about how to use .inc files and such.)

Spherical Products and Polar Functions:

The spherical product of two parametrically-defined planar curves, 
H(h_x(u), h_y(u)) and M(m_x(v), m_y(v)), is defined by (H * M)(u, v) via:
	x(u, v) = h_x(u)m_x(v)
	y(u, v) = h_y(u)m_x(v)
	z(u, v) = m_y(v)

(I use underscores, when I can't subscript.)

Note that about half the sources I looked up defined the product in the 

important to know which order a particular source is using!

Since every planar polar function can also be described via the 
canonical parameterization :  x = r(t)cos(t), 	y = r(t)sin(t), one can 
form the spherical product of any two polar functions, r_1(u) and r_2(v):

r_1 * r_2 (or r_2 * r_1 for the alternate definition) via:	

x(u, v) = r_1(u)cos(u)r_2(v)cos(v)
y(u, v) = r_1(u)sin(u)r_2(v)cos(v)
z(u, v) = r_2(v)sin(v)

To render these objects in a left-hand coordinate system (such as 
POVRay) and achieve the same pictures as with Mathematica or Maple, 
interchange the roles of y and z (as below, where F3 applies to the y 
component.)



r_1(u) = cos(3u) and r_2(v) = sin(2v):

#declare F1= function(u,v){cos(3*u)*cos(u)*sin(2*v)*cos(v)}
#declare F2= function(u,v){cos(3*u)*sin(u)*sin (2*v)*cos(v)}
#declare F3= function(u,v){sin(2*v)*sin(v)}

object{
    Parametric(
       F1, F3, F2,
       <FromU(0), FromV(0)>, <ToU(2*pi), ToV(2*pi)>,
       150,150,"C_3UxS_2V.inc"
    )
  [ object_modifiers ]
}

The parameters in "Parametric" are described in the #include files.

Here are 3 examples:

(Truth-In-Advertising Disclaimer:  The stem on the psychedelic flower is 
a sphere_sweep, and not a part of the product.  The captions were added 
in Photoshop.)


Post a reply to this message


Attachments:
Download 'polarspsjpg.jpg' (28 KB)

Preview of image 'polarspsjpg.jpg'
polarspsjpg.jpg


 

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