POV-Ray : Newsgroups : povray.text.scene-files : Bicubic Patch Macro (Macro Code) : Re: Bicubic Patch Macro (Scene File) Server Time
3 Jul 2024 00:38:36 EDT (-0400)
  Re: Bicubic Patch Macro (Scene File)  
From: Dave Dunn
Date: 7 Feb 2002 17:55:07
Message: <3C63062B.4B7A8466@aol.com>
/*This file shows patcher in action, modeling the petal of a flower. This is
something I have actually gone to the trouble of opening Moray for. Patcher
elminates the need for modelers when all you need is a simple patch (flag,
pennant, piece of paper, leaf etc). */

#include "colors.inc"
#include "textures.inc"
#include "patcher.mcr"

background {SkyBlue}

camera{ location<0,30,-60> look_at<0,0,0>}

light_source{ <-10,60,-130> White}

#declare Points = array [16]
{
//Bottom Row
<-1.5,-7.5,0>, //0-2 Blue Corner Lower Left
<-.5,-12.5,0>, //3-5 Yellow Lower Mid-Left
<.5,-12.5,0>,  //6-8 Yellow Lower Mid-Right
<1.5,-7.5,0>, //9-11 Blue Corner Lower Right
//Second Row
<-7.5,-2.5,0>,  // 12-14 Yellow Left Lower Mid
<-2.5,-2.5,-5>, //15-17 Green Center LL
<2.5,-2.5,-5>,  //18-20 Green Center LR
<7.5,-2.5,0>,  //21-23 Yellow Right Lower Mid
//Third Row
<-7.5,2.5,0>, //24-26 Yellow Left Upper Mid
<-2.5,2.5,-5>, //27-29 Green Center UL
<2.5,2.5,-5>,  //30-32 Green Center UR
<7.5,2.5,0>,  //33-35 Yellow Right Upper Mid
//Top Row
<-5,7.5,0>, //36-38 Blue corner Upper Left
<-2.5,12,0>, //39-41 Yellow Upper Mid-Left
<2.5,12,0>, //42-44 Yellow Upper Mid-Right
<5,7.5,0> //45-47 Blue Corner Upper Right
}

#declare Petal =
object {
Patcher(1,0,0,White,0)
rotate x*-70
rotate y*90
translate x*-11
rotate x*-10}

#declare Count = 0;
#while(Count<6)
object {Petal rotate y*60*Count}
#declare Count = Count+1;
#end
sphere {<0,-6,0>,3.5 scale <1,.5,1> pigment {Yellow} normal {granite}}
union {
cylinder {<0,-6,0,>,<-5,-12,-3>,1}
sphere {<-5,-12,-3>,1}
cylinder {<-5,-12,-3>,<-7,-20,-6>,1}
sphere {<-7,-20,-6>,1}
cylinder {<-7,-20,-6>,<-4,-40,-2>,1}
sphere {<-4,-40,-2>,1}
cylinder {<-4,-40,-2>,<0,-60,0>,1}
pigment {ForestGreen} normal {spiral1 3 rotate x*-90 scale .25}}


Post a reply to this message

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