POV-Ray : Newsgroups : povray.general : Can I put a bicubic patch into a circle? : Re: Can I put a bicubic patch into a circle? Server Time
30 Jul 2024 08:20:30 EDT (-0400)
  Re: Can I put a bicubic patch into a circle?  
From: Tim Attwood
Date: 16 May 2009 23:05:45
Message: <4a0f7f09$1@news.povray.org>
> Can I make a bicubic patch form into a circle with a math formula?
> I know I can manually use the control points to do so, but that's too
> labor-intensive.  Can it be performed with a math formula for a circle?

Sure, you could do that. Or just use vrotate, that's easier.

Here's a macro with some fudge factors thrown in

#macro bicubic_disc(outer_radus, outer_height, inner_radius, inner_height)
   #local o = <outer_radus, outer_height, 0>;
   #local o2 = <outer_radus*1.15, outer_height, 0>;
   #local i = <inner_radius, inner_height*2, 0>;
   bicubic_patch { type 0 u_steps 3 v_steps 3
      vrotate(o,225*y),vrotate(o2,255*y),vrotate(o2,285*y), 
vrotate(o,315*y),
      vrotate(o2,195*y),vrotate(i,225*y),vrotate(i,315*y), 
vrotate(o2,345*y),
      vrotate(o2,165*y),vrotate(i,135*y),vrotate(i,45*y), vrotate(o2,15*y),
      vrotate(o,135*y),vrotate(o2,105*y),vrotate(o2,75*y), vrotate(o,45*y)}
#end


Post a reply to this message

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