|
|
High!
andrel wrote:
> You probably mean 48 control points, for every bicubic patch the two
> inner lines plus the 8 control points on the ends of the flag.
> I also assume you compute the remaining control points by interpolation.
> In that case, it should not happen (but you knew that already).
>
> Can you state more specifics? Which version of POV and possibly show
> some source?
My version is 3.5 for Windows... and here is the code:
#declare fr=20; // Number of frames in animated GIF
#declare amp=0.02; // Amplitude of waving
#declare flag=
union
{
bicubic_patch
{
type 0 flatness 0.01 u_steps 4 v_steps 4
<0, 0, 0>, <0, 0, 1>, <0, 0, 2>, <0, 0, 3>,
<1, amp*sin(radians(10+clock*(360/fr))), 0>, <1,
amp*sin(radians(25+clock*(360/fr))), 1>, <1,
amp*sin(radians(55+clock*(360/fr))), 2>, <1,
amp*sin(radians(80+clock*(360/fr))), 3>,
<2, amp*2*sin(radians(25+clock*(360/fr))), 0>, <2,
amp*2*sin(radians(45+clock*(360/fr))), 1>, <2,
amp*2*sin(radians(70+clock*(360/fr))), 2>, <2,
amp*2*sin(radians(90+clock*(360/fr))), 3>,
<3, amp*3*sin(radians(35+clock*(360/fr))), 0>, <3,
amp*3*sin(radians(65+clock*(360/fr))), 1>, <3,
amp*3*sin(radians(85+clock*(360/fr))), 2>, <3,
amp*3*sin(radians(105+clock*(360/fr))), 3>
}
bicubic_patch
{
type 0 flatness 0.01 u_steps 4 v_steps 4
<3, amp*3*sin(radians(35+clock*(360/fr))), 0>, <3,
amp*3*sin(radians(65+clock*(360/fr))), 1>, <3,
amp*3*sin(radians(85+clock*(360/fr))), 2>, <3,
amp*3*sin(radians(105+clock*(360/fr))), 3>,
<4, amp*4*sin(radians(50+clock*(360/fr))), 0>, <4,
amp*4*sin(radians(75+clock*(360/fr))), 1>, <4,
amp*4*sin(radians(90+clock*(360/fr))), 2>, <4,
amp*4*sin(radians(120+clock*(360/fr))), 3>,
<5, amp*5*sin(radians(70+clock*(360/fr))), 0>, <5,
amp*5*sin(radians(90+clock*(360/fr))), 1>, <5,
amp*5*sin(radians(110+clock*(360/fr))), 2>, <5,
amp*5*sin(radians(135+clock*(360/fr))), 3>,
<6, amp*6*sin(radians(85+clock*(360/fr))), 0>, <6,
amp*6*sin(radians(100+clock*(360/fr))), 1>, <6,
amp*6*sin(radians(120+clock*(360/fr))), 2>, <6,
amp*6*sin(radians(155+clock*(360/fr))), 3>
}
bicubic_patch
{
type 0 flatness 0.01 u_steps 4 v_steps 4
<6, amp*6*sin(radians(85+clock*(360/fr))), 0>, <6,
amp*6*sin(radians(100+clock*(360/fr))), 1>, <6,
amp*6*sin(radians(120+clock*(360/fr))), 2>, <6,
amp*6*sin(radians(155+clock*(360/fr))), 3>,
<7, amp*7*sin(radians(105+clock*(360/fr))), 0>, <7,
amp*7*sin(radians(125+clock*(360/fr))), 1>, <7,
amp*7*sin(radians(145+clock*(360/fr))), 2>, <7,
amp*7*sin(radians(170+clock*(360/fr))), 3>,
<8, amp*8*sin(radians(125+clock*(360/fr))), 0>, <8,
amp*8*sin(radians(145+clock*(360/fr))), 1>, <8,
amp*8*sin(radians(170+clock*(360/fr))), 2>, <8,
amp*8*sin(radians(195+clock*(360/fr))), 3>,
<9, amp*9*sin(radians(140+clock*(360/fr))), 0>, <9,
amp*9*sin(radians(165+clock*(360/fr))), 1>, <9,
amp*9*sin(radians(180+clock*(360/fr))), 2>, <9,
amp*9*sin(radians(205+clock*(360/fr))), 3>
}
bicubic_patch
{
type 0 flatness 0.01 u_steps 4 v_steps 4
<9, amp*9*sin(radians(140+clock*(360/fr))), 0>, <9,
amp*9*sin(radians(165+clock*(360/fr))), 1>, <9,
amp*9*sin(radians(180+clock*(360/fr))), 2>, <9,
amp*9*sin(radians(205+clock*(360/fr))), 3>
<10, amp*10*sin(radians(160+clock*(360/fr))), 0>, <10,
amp*10*sin(radians(175+clock*(360/fr))), 1>, <10,
amp*10*sin(radians(190+clock*(360/fr))), 2>, <10,
amp*10*sin(radians(215+clock*(360/fr))), 3>,
<11, amp*10*sin(radians(180+clock*(360/fr))), 0>, <11,
amp*10*sin(radians(190+clock*(360/fr))), 1>, <11,
amp*10*sin(radians(210+clock*(360/fr))), 2>, <11,
amp*10*sin(radians(230+clock*(360/fr))), 3>,
<12, amp*10*sin(radians(195+clock*(360/fr))), 0>, <12,
amp*10*sin(radians(215+clock*(360/fr))), 1>, <12,
amp*10*sin(radians(235+clock*(360/fr))), 2>, <12,
amp*10*sin(radians(250+clock*(360/fr))), 3>
}
bicubic_patch
{
type 0 flatness 0.01 u_steps 4 v_steps 4
<12, amp*10*sin(radians(195+clock*(360/fr))), 0>, <12,
amp*10*sin(radians(215+clock*(360/fr))), 1>, <12,
amp*10*sin(radians(235+clock*(360/fr))), 2>, <12,
amp*10*sin(radians(250+clock*(360/fr))), 3>,
<13, amp*10*sin(radians(210+clock*(360/fr))), 0>, <13,
amp*10*sin(radians(225+clock*(360/fr))), 1>, <13,
amp*10*sin(radians(240+clock*(360/fr))), 2>, <13,
amp*10*sin(radians(265+clock*(360/fr))), 3>,
<14, amp*10*sin(radians(220+clock*(360/fr))), 0>, <14,
amp*10*sin(radians(235+clock*(360/fr))), 1>, <14,
amp*10*sin(radians(260+clock*(360/fr))), 2>, <14,
amp*10*sin(radians(280+clock*(360/fr))), 3>,
<15, amp*10*sin(radians(240+clock*(360/fr))), 0>, <15,
amp*10*sin(radians(260+clock*(360/fr))), 1>, <15,
amp*10*sin(radians(275+clock*(360/fr))), 2>, <15,
amp*10*sin(radians(295+clock*(360/fr))), 3>
}
texture
{
pigment
{
image_map
{
png "h:\lis-spiegel\lis\afghanistan\afghflag.png"
once
interpolate 4
}
rotate x*90
scale <15, 1, 3>
}
finish { ambient 0.05 diffuse 1.5 brilliance 1 }
}
}
object
{
flag
scale <300, 100, 150>/<15, 1, 3>
}
sky_sphere
{
pigment { color rgb 1 }
}
light_source
{
<2000, 50000, 5000>
color rgb 1
}
camera
{
location <150, 300, 75>
look_at <150, 0, 75>
}
> I am not really familiar with isosurfaces, but I think it would be
> slower and you get a 3D object.
I think you mean "finite solid object" rather than just a surface... but
if I remember well, there should be a way to render just the surface
even with isosurfaces!
> Good idea, now playin Roundabout (Keys to ascension, Yes),
> Starship Trooper coming up in a minute.
Cool! Raytracing and being a Yes fan seems to go together well... to me,
the music of Yes is like an aural trip to the Hindu Kush!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|