![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
[Image]
This is my lego planet. It's made entirely of clear 4x2 Lego blocks.
It was to have a diameter of 500 units, but anything much over 20 and it
crashes my system.
Here's the source.
// Persistence of Vision Ray Tracer Scene Description File
// File: ClearLegoFortress.pov
// Vers: 3.1
// Desc: Clear Lego Planets
// Date: 3/28/2K1
// Auth: Bryan Valencia
//
#version unofficial MegaPov 0.6;
#include "colors.inc"
global_settings{assumed_gamma 1.0}
#include "Lego.inc"
#declare D=20; //units, not blocks
#declare A=-D;
#while (A<D)
#declare B=-D;
#while (B<D)
#declare C=-D;
#while (C<D)
#if (sqrt((A*A)+(B*B)+(C*C))<D) object {ClearLego
translate<A,B,C>} #end
#declare C=C+BZ;
#end
#declare B=B+LH;
#end
#declare A=A+BX;
#end
// ----------------------------------------
camera{
location <-D, D, -D*3>
look_at <0,0,0>
}
light_source{ <-90, 30, 30> color rgb<1,1,1> }
// ----------------------------------------
//This is Lego.inc
#declare LH=1.5;
#declare CT=LH+.25;
#declare Rounding=0.04;
#declare BX=2;
#declare BZ=4;
#declare Z=Rounding;
#declare FH=LH-Rounding;
#declare FX=BX-Rounding;
#declare FZ=BZ-Rounding;
#declare SubtractFrame=merge{
cylinder{<0,0,0><BX,0,0>,Rounding}
cylinder{<0,LH,0><BX,LH,0>,Rounding}
cylinder{<0,0,BZ><BX,0,BZ>,Rounding}
cylinder{<0,LH,BZ><BX,LH,BZ>,Rounding}
cylinder{<0,0,BZ><0,LH,BZ>,Rounding}
cylinder{<BX,0,BZ><BX,LH,BZ>,Rounding}
cylinder{<0,0,0><0,LH,0>,Rounding}
cylinder{<BX,0,0><BX,LH,0>,Rounding}
cylinder{<0,0,0><0,0,BZ>,Rounding}
cylinder{<BX,0,0><BX,0,BZ>,Rounding}
cylinder{<0,LH,0><0,LH,BZ>,Rounding}
cylinder{<BX,LH,0><BX,LH,BZ>,Rounding}
sphere{<0,0,0>,Rounding}//bottom4
sphere{<BX,0,0>,Rounding}
sphere{<BX,0,BZ>,Rounding}
sphere{<0,0,BZ>,Rounding}
sphere{<0,LH,0>,Rounding}//top
sphere{<BX,LH,0>,Rounding}
sphere{<BX,LH,BZ>,Rounding}
sphere{<0,LH,BZ>,Rounding}
}
#declare AddFrame=merge{
cylinder{<Z,Z,Z><FX,Z,Z>,Rounding}
cylinder{<Z,FH,Z><FX,FH,Z>,Rounding}
cylinder{<Z,Z,FZ><FX,Z,FZ>,Rounding}
cylinder{<Z,FH,FZ><FX,FH,FZ>,Rounding}
cylinder{<Z,Z,FZ><Z,FH,FZ>,Rounding}
cylinder{<FX,Z,FZ><FX,FH,FZ>,Rounding}
cylinder{<Z,Z,Z><Z,FH,Z>,Rounding}
cylinder{<FX,Z,Z><FX,FH,Z>,Rounding}
cylinder{<Z,Z,Z><Z,Z,FZ>,Rounding}
cylinder{<FX,Z,Z><FX,Z,FZ>,Rounding}
cylinder{<Z,FH,Z><Z,FH,FZ>,Rounding}
cylinder{<FX,FH,Z><FX,FH,FZ>,Rounding}
sphere{<Z,Z,Z>,Rounding}//bottom4
sphere{<FX,Z,Z>,Rounding}
sphere{<FX,Z,FZ>,Rounding}
sphere{<Z,Z,FZ>,Rounding}
sphere{<Z,FH,Z>,Rounding}//top
sphere{<FX,FH,Z>,Rounding}
sphere{<FX,FH,FZ>,Rounding}
sphere{<Z,FH,FZ>,Rounding}
}
#declare INR1=.4;
#declare InCyl=union{
difference{
cylinder{<0,0,0>,<0,LH-Rounding,0>,INR1}
cylinder{<0,-Rounding,0>,<0,LH-Rounding,0>,INR1-Rounding}
}
torus{INR1-Rounding, Rounding}
}
#declare Lego=union{
difference{
box{<0,0,0><BX,1.5,BZ>}
union{
object{SubtractFrame}
box{<Rounding,-Rounding,Rounding><BX-Rounding,LH-.1,BZ-Rounding>}
}
}
object{InCyl translate<BX/2, 0, BZ/2>}
object{InCyl translate<BX/2, 0, BZ/2+1>}
object{InCyl translate<BX/2, 0, BZ/2-1>}
object{AddFrame}
cylinder{<.5,LH,.5> <.5,CT,.5>,.2}
cylinder{<1.5,LH,.5> <1.5,CT,.5>,.2}
cylinder{<.5,LH,1.5> <.5,CT,1.5>,.2}
cylinder{<1.5,LH,1.5> <1.5,CT,1.5>,.2}
cylinder{<.5,LH,2.5> <.5,CT,2.5>,.2}
cylinder{<1.5,LH,2.5> <1.5,CT,2.5>,.2}
cylinder{<.5,LH,3.5> <.5,CT,3.5>,.2}
cylinder{<1.5,LH,3.5> <1.5,CT,3.5>,.2}
}
#declare FastClear = texture{
pigment{rgbf<1,1,1,.8>}
finish{reflection .1 phong .2}
}
#declare LegoIOR=1.88;
#declare ClearLego=object{Lego texture{FastClear} interior{ ior LegoIOR
}}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body background="cid:par### [at] 209software com">
<img SRC="cid:par### [at] 209software com" height=120 width=160>
</body>
</html>
Post a reply to this message
Attachments:
Download 'c:\temp\nsmailm9.gif' (1 KB)
Download 'c:\temp\nsmail9h.jpeg.jpg' (3 KB)
Preview of image 'c:\temp\nsmailm9.gif'
![c:\temp\nsmailm9.gif](/povray.binaries.images/attachment/%3C3ACA1D00.9D8D3C27%40209software.com%3E/c%3A%5Ctemp%5Cnsmailm9.gif?preview=1)
Preview of image 'c:\temp\nsmail9h.jpeg.jpg'
![c:\temp\nsmail9h.jpeg.jpg](/povray.binaries.images/attachment/%3C3ACA1D00.9D8D3C27%40209software.com%3E/c%3A%5Ctemp%5Cnsmail9h.jpeg.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Yep, those exponentially huge scenes will do it every time... Something
tells me you will never see your planet rendered at 500 units!
Regards,
Dave
"Bryan Valencia" <bry### [at] 209software com> wrote in message
news:3ACA1CC1.A576CCF7@209software.com...
> This is my lego planet. It's made entirely of clear 4x2 Lego blocks.
> It was to have a diameter of 500 units, but anything much over 20 and it
> crashes my system.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I gave the scene a try and then put another zero onto the 20 units. This
800MHz CPU struggled with it for 8 minutes before the memory gave out. Has
taken another 14 minutes to free it back, at least much faster than my other
computer with 256MB and 500MHz CPU would have been. I have 192MB on here.
I was going to ask if coincident surfaces might be the cause but now I
wonder. Still, I'm not certain about it but even with merge wouldn't so
many coincident surfaces within a clear CSG be potential trouble?
Bob H.
"Dave Blandston" <gra### [at] earthlink net> wrote in message
news:3aca3b46@news.povray.org...
> Yep, those exponentially huge scenes will do it every time... Something
> tells me you will never see your planet rendered at 500 units!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I was thinking that instead of making it solid, I could make it, say 5 units
thick... That's still a lot of legos, but maybe I could get a bigger sphere.
"Bob H." wrote:
> I gave the scene a try and then put another zero onto the 20 units. This
> 800MHz CPU struggled with it for 8 minutes before the memory gave out. Has
> taken another 14 minutes to free it back, at least much faster than my other
> computer with 256MB and 500MHz CPU would have been. I have 192MB on here.
> I was going to ask if coincident surfaces might be the cause but now I
> wonder. Still, I'm not certain about it but even with merge wouldn't so
> many coincident surfaces within a clear CSG be potential trouble?
>
> Bob H.
>
> "Dave Blandston" <gra### [at] earthlink net> wrote in message
> news:3aca3b46@news.povray.org...
> > Yep, those exponentially huge scenes will do it every time... Something
> > tells me you will never see your planet rendered at 500 units!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
That's just what I was about to suggest! Probably even 3-4 levels thick
would be sufficient. (While leaving the center hollow.) All those cylinders
would obscure any objects that were more than a few levels deep inside the
object anyway. That way you should be able to make it pretty big.
-Dave
"Bryan Valencia" <bry### [at] 209software com> wrote in message
news:3ACA4062.AEFFC4DD@209software.com...
> I was thinking that instead of making it solid, I could make it, say 5
units
> thick... That's still a lot of legos, but maybe I could get a bigger
sphere.
>
> "Bob H." wrote:
>
> > I gave the scene a try and then put another zero onto the 20 units.
This
> > 800MHz CPU struggled with it for 8 minutes before the memory gave out.
Has
> > taken another 14 minutes to free it back, at least much faster than my
other
> > computer with 256MB and 500MHz CPU would have been. I have 192MB on
here.
> > I was going to ask if coincident surfaces might be the cause but now I
> > wonder. Still, I'm not certain about it but even with merge wouldn't so
> > many coincident surfaces within a clear CSG be potential trouble?
> >
> > Bob H.
> >
> > "Dave Blandston" <gra### [at] earthlink net> wrote in message
> > news:3aca3b46@news.povray.org...
> > > Yep, those exponentially huge scenes will do it every time...
Something
> > > tells me you will never see your planet rendered at 500 units!
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
This is interesting: I put in some #render commands, and I found that my
#declare C=C+BZ;
line NEVER gets called.
Did I screw up the #if command?
Bryan Valencia wrote:
> [Image]
>
> This is my lego planet. It's made entirely of clear 4x2 Lego blocks.
> It was to have a diameter of 500 units, but anything much over 20 and it
> crashes my system.
>
> Here's the source.
>
> // Persistence of Vision Ray Tracer Scene Description File
> // File: ClearLegoFortress.pov
> // Vers: 3.1
> // Desc: Clear Lego Planets
> // Date: 3/28/2K1
> // Auth: Bryan Valencia
> //
>
> #version unofficial MegaPov 0.6;
>
> #include "colors.inc"
>
> global_settings{assumed_gamma 1.0}
>
> #include "Lego.inc"
>
> #declare D=20; //units, not blocks
>
> #declare A=-D;
> #while (A<D)
>
> #declare B=-D;
> #while (B<D)
> #declare C=-D;
> #while (C<D)
> #if (sqrt((A*A)+(B*B)+(C*C))<D) object {ClearLego
> translate<A,B,C>} #end
> #declare C=C+BZ;
>
> #end
> #declare B=B+LH;
> #end
> #declare A=A+BX;
> #end
>
> // ----------------------------------------
> camera{
> location <-D, D, -D*3>
> look_at <0,0,0>
> }
>
> light_source{ <-90, 30, 30> color rgb<1,1,1> }
>
> // ----------------------------------------
>
> //This is Lego.inc
> #declare LH=1.5;
> #declare CT=LH+.25;
> #declare Rounding=0.04;
> #declare BX=2;
> #declare BZ=4;
>
> #declare Z=Rounding;
> #declare FH=LH-Rounding;
> #declare FX=BX-Rounding;
> #declare FZ=BZ-Rounding;
>
> #declare SubtractFrame=merge{
> cylinder{<0,0,0><BX,0,0>,Rounding}
> cylinder{<0,LH,0><BX,LH,0>,Rounding}
> cylinder{<0,0,BZ><BX,0,BZ>,Rounding}
> cylinder{<0,LH,BZ><BX,LH,BZ>,Rounding}
> cylinder{<0,0,BZ><0,LH,BZ>,Rounding}
> cylinder{<BX,0,BZ><BX,LH,BZ>,Rounding}
> cylinder{<0,0,0><0,LH,0>,Rounding}
> cylinder{<BX,0,0><BX,LH,0>,Rounding}
> cylinder{<0,0,0><0,0,BZ>,Rounding}
> cylinder{<BX,0,0><BX,0,BZ>,Rounding}
> cylinder{<0,LH,0><0,LH,BZ>,Rounding}
> cylinder{<BX,LH,0><BX,LH,BZ>,Rounding}
> sphere{<0,0,0>,Rounding}//bottom4
> sphere{<BX,0,0>,Rounding}
> sphere{<BX,0,BZ>,Rounding}
> sphere{<0,0,BZ>,Rounding}
> sphere{<0,LH,0>,Rounding}//top
> sphere{<BX,LH,0>,Rounding}
> sphere{<BX,LH,BZ>,Rounding}
> sphere{<0,LH,BZ>,Rounding}
> }
>
> #declare AddFrame=merge{
> cylinder{<Z,Z,Z><FX,Z,Z>,Rounding}
> cylinder{<Z,FH,Z><FX,FH,Z>,Rounding}
> cylinder{<Z,Z,FZ><FX,Z,FZ>,Rounding}
> cylinder{<Z,FH,FZ><FX,FH,FZ>,Rounding}
> cylinder{<Z,Z,FZ><Z,FH,FZ>,Rounding}
> cylinder{<FX,Z,FZ><FX,FH,FZ>,Rounding}
> cylinder{<Z,Z,Z><Z,FH,Z>,Rounding}
> cylinder{<FX,Z,Z><FX,FH,Z>,Rounding}
> cylinder{<Z,Z,Z><Z,Z,FZ>,Rounding}
> cylinder{<FX,Z,Z><FX,Z,FZ>,Rounding}
> cylinder{<Z,FH,Z><Z,FH,FZ>,Rounding}
> cylinder{<FX,FH,Z><FX,FH,FZ>,Rounding}
> sphere{<Z,Z,Z>,Rounding}//bottom4
> sphere{<FX,Z,Z>,Rounding}
> sphere{<FX,Z,FZ>,Rounding}
> sphere{<Z,Z,FZ>,Rounding}
> sphere{<Z,FH,Z>,Rounding}//top
> sphere{<FX,FH,Z>,Rounding}
> sphere{<FX,FH,FZ>,Rounding}
> sphere{<Z,FH,FZ>,Rounding}
> }
>
> #declare INR1=.4;
>
> #declare InCyl=union{
> difference{
> cylinder{<0,0,0>,<0,LH-Rounding,0>,INR1}
> cylinder{<0,-Rounding,0>,<0,LH-Rounding,0>,INR1-Rounding}
>
> }
> torus{INR1-Rounding, Rounding}
> }
>
> #declare Lego=union{
> difference{
> box{<0,0,0><BX,1.5,BZ>}
> union{
> object{SubtractFrame}
>
> box{<Rounding,-Rounding,Rounding><BX-Rounding,LH-.1,BZ-Rounding>}
> }
> }
> object{InCyl translate<BX/2, 0, BZ/2>}
> object{InCyl translate<BX/2, 0, BZ/2+1>}
> object{InCyl translate<BX/2, 0, BZ/2-1>}
> object{AddFrame}
> cylinder{<.5,LH,.5> <.5,CT,.5>,.2}
> cylinder{<1.5,LH,.5> <1.5,CT,.5>,.2}
> cylinder{<.5,LH,1.5> <.5,CT,1.5>,.2}
> cylinder{<1.5,LH,1.5> <1.5,CT,1.5>,.2}
> cylinder{<.5,LH,2.5> <.5,CT,2.5>,.2}
> cylinder{<1.5,LH,2.5> <1.5,CT,2.5>,.2}
> cylinder{<.5,LH,3.5> <.5,CT,3.5>,.2}
> cylinder{<1.5,LH,3.5> <1.5,CT,3.5>,.2}
> }
>
> #declare FastClear = texture{
> pigment{rgbf<1,1,1,.8>}
> finish{reflection .1 phong .2}
> }
>
> #declare LegoIOR=1.88;
>
> #declare ClearLego=object{Lego texture{FastClear} interior{ ior LegoIOR
> }}
--
Bryan Valencia
Software Development Engineer
ELOAN - A better way to get a loan.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |