POV-Ray : Newsgroups : povray.binaries.images : Sixshot WIP (~140 KB) Server Time
17 Nov 2024 20:22:04 EST (-0500)
  Sixshot WIP (~140 KB) (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: JRG
Subject: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 09:02:18
Message: <413b0e5a@news.povray.org>
I haven't touched POV-Ray for... hmm... 18 months? Nothing really fancy 
here, just a test on modelling. I know it's an awful render... but I got 
really rusty at this kind of things. If I have some free time left I'll 
try and finish this thing, with textures and a proper scene.

Cheers!

-- 
Jonathan.


Post a reply to this message


Attachments:
Download 'sixshot.jpg' (152 KB)

Preview of image 'sixshot.jpg'
sixshot.jpg


 

From: LightBeam
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 11:27:20
Message: <413b3058@news.povray.org>
JRG wrote:
> I haven't touched POV-Ray for... hmm... 18 months? Nothing really fancy 
> here, just a test on modelling. I know it's an awful render... but I got 
> really rusty at this kind of things. If I have some free time left I'll 
> try and finish this thing, with textures and a proper scene.
> 
> Cheers!
> 
> 
> ------------------------------------------------------------------------
> 
Oh nice done ! I especially love the lightning...


Post a reply to this message

From: Arlo J
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 12:07:06
Message: <413b39aa$1@news.povray.org>
JRG wrote:

> here, just a test on modelling. I know it's an awful render... but I got 

Awful render? A clean, high-resolution radiosity render which shows off 
the detail of your model ain't nothing to sneeze at... ;)

I like it. :)

Arlo


Post a reply to this message

From: Hugo Asm
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 13:11:11
Message: <413b48af$1@news.povray.org>
Welcome back! Nice to see you around here again! I still have your kitchen
objects on my harddisk, and now you got a hit again. This is a very good
piece of modelling. You really haven't lost your touch for POV-Ray
completely ..I assume you built it all from POV primitives?  I just love
these kind of "tech" objects. The rendering is fair and compliments the
object.

What more can I say but yummy! I saved the picture on my harddisk. Please
let us know how it goes.

Regards,
Hugo


Post a reply to this message

From: JRG
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 14:33:04
Message: <413b5be0@news.povray.org>
Hugo Asm wrote:
> Welcome back! Nice to see you around here again! I still have your kitchen
> objects on my harddisk, and now you got a hit again. This is a very good
> piece of modelling. You really haven't lost your touch for POV-Ray
> completely ..I assume you built it all from POV primitives?  I just love
> these kind of "tech" objects. The rendering is fair and compliments the
> object.
> 
> What more can I say but yummy! I saved the picture on my harddisk. Please
> let us know how it goes.

Hello Hugo. Nice to see you too! Actually... hmm, maybe I should have 
mentioned it... this is a toy, from the transformers collection, ever 
heard of it?
http://www.seibertron.com/cotm/200106/Sixshot_t001.jpg
And some bio: http://www.seibertron.com/cotm/200106/

Cheers!

--
Jonathan.


Post a reply to this message

From: JRG
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 14:34:24
Message: <413b5c30$1@news.povray.org>
Arlo J wrote:

> JRG wrote:
> 
>> here, just a test on modelling. I know it's an awful render... but I got 
> 
> 
> Awful render? A clean, high-resolution radiosity render which shows off 
> the detail of your model ain't nothing to sneeze at... ;)
> 
> I like it. :)

Glad you do!

--
Jonathan.


Post a reply to this message

From: JRG
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 14:37:24
Message: <413b5ce4@news.povray.org>
LightBeam wrote:

> JRG wrote:
> 
>> I haven't touched POV-Ray for... hmm... 18 months? Nothing really 
>> fancy here, just a test on modelling. I know it's an awful render... 
>> but I got really rusty at this kind of things. If I have some free 
>> time left I'll try and finish this thing, with textures and a proper 
>> scene.
>>
>> Cheers!
>>
>>
>> ------------------------------------------------------------------------
>>
> Oh nice done ! I especially love the lightning...

A white light source.
A white background.
A white ground.
Radiosity turned on.

Long live clay renders!
:-/

--
Jonathan.


Post a reply to this message

From: Hugo Asm
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 15:16:22
Message: <413b6606$1@news.povray.org>
> this is a toy, from the transformers collection, ever heard of it?

Ahaaa. No, I never heard of it until now. But that doesn't make your
accomplishment any less. It's just a different kind of task to recreate
something exactly. It's not easy, especially without blueprints.

You seem to have a talent for working with scripts and math. As I recall you
can get far in no time. Have you been active in other 3d-graphical
applications?

Regards,
Hugo


Post a reply to this message

From: Christoph Hormann
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 15:50:02
Message: <chfqj5$92l$1@chho.imagico.de>
JRG wrote:
> I haven't touched POV-Ray for... hmm... 18 months? Nothing really fancy 
> here, just a test on modelling. I know it's an awful render... but I got 
> really rusty at this kind of things. If I have some free time left I'll 
> try and finish this thing, with textures and a proper scene.

Welcome back!

Nice modeling work and as usual good lighting.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: JRG
Subject: Re: Sixshot WIP (~140 KB)
Date: 5 Sep 2004 15:51:59
Message: <413b6e5f@news.povray.org>
Hugo Asm wrote:

>>this is a toy, from the transformers collection, ever heard of it?
> 
> 
> Ahaaa. No, I never heard of it until now. But that doesn't make your
> accomplishment any less. It's just a different kind of task to recreate
> something exactly. It's not easy, especially without blueprints.
> 
> You seem to have a talent for working with scripts and math. As I recall you
> can get far in no time. Have you been active in other 3d-graphical
> applications?

Actually it's pretty easy... sure, I have no blueprints... but, *cough*, 
I got the real thing! ;-)
This took almost a week, due to the fact I wanted rounded edges just 
everywhere... so... a simple thing like the robot's head could cause me 
several hours of headache:

//-----testa

#declare testa1 =
union {
   //----frontale superiore
   difference {
     mesh {
       #declare r2 = 0.02;
       #declare _h = 0.3;
       quad (-1.7/2*x, 1.7/2*x, 1.7/2*x-0.125*z, -1.7/2*x-0.125*z, y, 
0*x, y+x, /*h1 = 2.1; h2 = 1.05; d1 = 0.125; d2 = 1.05;*/ y+#declare _n 
= norm (-1.7/2*x-0.125*z, 1.7/2-0.125*z, -(2.1-1.05)*y-(1.05-0.125)*z); 
_n, y-x, r2)
       quad (<-1.7/2, 0, -0.125>, <1.7/2, 0, -0.125>, <1.5/2, #declare 
_y =-(2.1-1.05)*(0.5-0.125)/(1.05-0.125); _y, -0.5>, <-1.5/2, _y, -0.5>, 
_n, y+_n, _n+norm (<1.7/2, 0, -0.125>, <1.7/2, _y, -0.125>, <1.5/2, _y, 
-0.5>), 0*x, _n-norm (<-1.7/2, 0, -0.125>, <-1.7/2, _y, -0.125>, 
<-1.5/2, _y, -0.5>), r2)
       quad (<-1.5/2, _y, -0.5>, <1.5/2, _y, -0.5>, <0.2, -(2.1-1.05), 
-1.05>, <-0.2, -(2.1-1.05), -1.05>, _n, 0*x, _n+ norm (<1.5/2, _y, 
-0.5>, <1.5/2, _y-0.5, -0.5>, <0.2, -(2.1-1.05), -1.05>), _n+#declare 
_n2 = norm (<-0.2, -(2.1-1.05), -1.05>, <0, -(2.1-1.05), -1.05>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>); _n2, _n-norm 
(<-1.5/2, _y, -0.5>, <-1.5/2, _y-0.5, -0.5>, <-0.2, -(2.1-1.05), 
-1.05>), r2)
       quad (<-0.2, -(2.1-1.05), -1.05>, <0.2, -(2.1-1.05), -1.05>, 
<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>, _n2, _n+_n2, 
_n2+norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, -0.5>, <0.2, -(2.1-1.05), 
-1.05>), _n2-norm (<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, 
-1>, <-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, 
-1>,(_y-0.5-_h)*y), _n2-norm (<-1.5/2, _y, -0.5>, <-1.5/2, _y-0.5, 
-0.5>, <-0.2, -(2.1-1.05), -1.05>), r2)
       quad (<-1.5/2, _y, -0.5>, <-0.2, -(2.1-1.05), -1.05>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>, <-1.5/2, _y-0.5, 
-0.5>, -norm (<-1.5/2, _y, -0.5>, <-1.5/2, _y-0.5, -0.5>, <-0.2, 
-(2.1-1.05), -1.05>), -norm (<-1.5/2, _y, -0.5>, <-1.5/2, _y-0.5, -0.5>, 
<-0.2, -(2.1-1.05), -1.05>)+_n, -norm (<-1.5/2, _y, -0.5>, <-1.5/2, 
_y-0.5, -0.5>, <-0.2, -(2.1-1.05), -1.05>)+_n2, -norm (<-1.5/2, _y, 
-0.5>, <-1.5/2, _y-0.5, -0.5>, <-0.2, -(2.1-1.05), -1.05>)+norm ( 
<-1.7/2, _y-0.5, -0.125>, <-1.5/2, _y-0.5, -0.5>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>), -norm (<-1.5/2, 
_y, -0.5>, <-1.5/2, _y-0.5, -0.5>, <-0.2, -(2.1-1.05), -1.05>) -norm 
(<-1.7/2, 0, -0.125>, <-1.7/2, _y, -0.125>, <-1.5/2, _y, -0.5>), r2)
       quad (<1.5/2, _y, -0.5>, <0.2, -(2.1-1.05), -1.05>, 
<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>, <1.5/2, _y-0.5, 
-0.5>, norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, -0.5>, <0.2, 
-(2.1-1.05), -1.05>), norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, -0.5>, 
<0.2, -(2.1-1.05), -1.05>)+_n, norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, 
-0.5>, <0.2, -(2.1-1.05), -1.05>)+_n2, norm (<1.5/2, _y, -0.5>, <1.5/2, 
_y-0.5, -0.5>, <0.2, -(2.1-1.05), -1.05>)-norm ( <1.7/2, _y-0.5, 
-0.125>, <1.5/2, _y-0.5, -0.5>, <0.2+0.05/1.6*(1.5-0.2), 
-(2.1-0.9)+0.05/1.6*0.2, -1>), norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, 
-0.5>, <0.2, -(2.1-1.05), -1.05>) +norm (<1.7/2, 0, -0.125>, <1.7/2, _y, 
-0.125>, <1.5/2, _y, -0.5>), r2)
       quad (-1.7/2*x, -1.7/2*x-0.125*z, <-1.7/2, _y-0.5, -0.125>, 
<-1.7/2, _y-0.5, 0>, -x, -x+y, -x-norm (<-1.7/2, 0, -0.125>, <-1.7/2, 
_y, -0.125>, <-1.5/2, _y, -0.5>), 0*x, 0*x, r2)
       quad (1.7/2*x, 1.7/2*x-0.125*z, <1.7/2, _y-0.5, -0.125>, <1.7/2, 
_y-0.5, 0>, x, x+y, x+norm (<1.7/2, 0, -0.125>, <1.7/2, _y, -0.125>, 
<1.5/2, _y, -0.5>), 0*x, 0*x, r2)
       quad (-1.7/2*x-0.125*z, <-1.5/2, _y, -0.5>, <-1.5/2, _y-0.5, 
-0.5>, <-1.7/2, _y-0.5, -0.125>, -norm (<-1.7/2, 0, -0.125>, <-1.7/2, 
_y, -0.125>, <-1.5/2, _y, -0.5>), -norm (<-1.7/2, 0, -0.125>, <-1.7/2, 
_y, -0.125>, <-1.5/2, _y, -0.5>)+_n, -norm (<-1.7/2, 0, -0.125>, 
<-1.7/2, _y, -0.125>, <-1.5/2, _y, -0.5>) -norm (<-1.5/2, _y, -0.5>, 
<-1.5/2, _y-0.5, -0.5>, <-0.2, -(2.1-1.05), -1.05>), -norm (<-1.7/2, 0, 
-0.125>, <-1.7/2, _y, -0.125>, <-1.5/2, _y, -0.5>)+norm ( <-1.7/2, 
_y-0.5, -0.125>, <-1.5/2, _y-0.5, -0.5>, <-0.2-0.05/1.6*(1.5-0.2), 
-(2.1-0.9)+0.05/1.6*0.2, -1>), -norm (<-1.7/2, 0, -0.125>, <-1.7/2, _y, 
-0.125>, <-1.5/2, _y, -0.5>)-x, r2)
       quad (1.7/2*x-0.125*z, <1.5/2, _y, -0.5>, <1.5/2, _y-0.5, -0.5>, 
<1.7/2, _y-0.5, -0.125>, norm (<1.7/2, 0, -0.125>, <1.7/2, _y, -0.125>, 
<1.5/2, _y, -0.5>), norm (<1.7/2, 0, -0.125>, <1.7/2, _y, -0.125>, 
<1.5/2, _y, -0.5>)+_n, norm (<1.7/2, 0, -0.125>, <1.7/2, _y, -0.125>, 
<1.5/2, _y, -0.5>) +norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, -0.5>, 
<0.2, -(2.1-1.05), -1.05>), norm (<1.7/2, 0, -0.125>, <1.7/2, _y, 
-0.125>, <1.5/2, _y, -0.5>)-norm ( <1.7/2, _y-0.5, -0.125>, <1.5/2, 
_y-0.5, -0.5>, <0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>), 
norm (<1.7/2, 0, -0.125>, <1.7/2, _y, -0.125>, <1.5/2, _y, -0.5>)+x, r2)
       triangolo (<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>,(_y-0.5-_h)*y, 
-norm (<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>,(_y-0.5-_h)*y), 
0*x, 0*x, 0*x, r2)
       quad (<-1.7/2, _y-0.5, -0.125>, <-1.5/2, _y-0.5, -0.5>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>,(_y-0.5-_h)*y, 
norm ( <-1.7/2, _y-0.5, -0.125>, <-1.5/2, _y-0.5, -0.5>, 
<-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>), norm ( <-1.7/2, 
_y-0.5, -0.125>, <-1.5/2, _y-0.5, -0.5>, <-0.2-0.05/1.6*(1.5-0.2), 
-(2.1-0.9)+0.05/1.6*0.2, -1>) -norm (<-1.7/2, 0, -0.125>, <-1.7/2, _y, 
-0.125>, <-1.5/2, _y, -0.5>),  norm ( <-1.7/2, _y-0.5, -0.125>, <-1.5/2, 
_y-0.5, -0.5>, <-0.2-0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, 
-1>)-norm (<-1.5/2, _y, -0.5>, <-1.5/2, _y-0.5, -0.5>, <-0.2, 
-(2.1-1.05), -1.05>), 0*x, 0*x, r2)
       triangolo (<-1.7/2, _y-0.5, 0>, <-1.7/2, _y-0.5, -0.125>, 
(_y-0.5-_h)*y, norm (<-1.7/2, _y-0.5, 0>, <-1.7/2, _y-0.5, -0.125>, 
(_y-0.5-_h)*y), 0*x, 0*x, 0*x, r2)
       quad (<1.7/2, _y-0.5, -0.125>, <1.5/2, _y-0.5, -0.5>, 
<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>,(_y-0.5-_h)*y, 
-norm ( <1.7/2, _y-0.5, -0.125>, <1.5/2, _y-0.5, -0.5>, 
<0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, -1>), -norm ( <1.7/2, 
_y-0.5, -0.125>, <1.5/2, _y-0.5, -0.5>, <0.2+0.05/1.6*(1.5-0.2), 
-(2.1-0.9)+0.05/1.6*0.2, -1>) +norm (<1.7/2, 0, -0.125>, <1.7/2, _y, 
-0.125>, <1.5/2, _y, -0.5>),  -norm ( <1.7/2, _y-0.5, -0.125>, <1.5/2, 
_y-0.5, -0.5>, <0.2+0.05/1.6*(1.5-0.2), -(2.1-0.9)+0.05/1.6*0.2, 
-1>)+norm (<1.5/2, _y, -0.5>, <1.5/2, _y-0.5, -0.5>, <0.2, -(2.1-1.05), 
-1.05>), 0*x, 0*x, r2)
       triangolo (<1.7/2, _y-0.5, 0>, <1.7/2, _y-0.5, -0.125>, 
(_y-0.5-_h)*y, -norm (<1.7/2, _y-0.5, 0>, <1.7/2, _y-0.5, -0.125>, 
(_y-0.5-_h)*y), 0*x, 0*x, 0*x, r2)
       quad (-1.7/2*x, 1.7/2*x, <1.7/2, _y-0.5, 0>, <-1.7/2, _y-0.5, 0>, 
z, 0*x, 0*x, 0*x, 0*x, r2)
       triangolo (<-1.7/2, _y-0.5, 0>, <1.7/2, _y-0.5, 0>, 
(_y-0.5-_h)*y, z, 0*x, 0*x, 0*x, r2)
       inside_vector z
     }
     sphere {
       0, 1
       scale <1.7/2-0.2, 2.1-1.05-0.1, 1.5*10>
     }
   }
   //-------superiore
   intersection {
     union {
       box {
         <-1.5/2, -0.05, 0>, <1.5/2, -1, -.3>
       }
       intersection {
         cylinder {
           -1.5/2*x, 1.5/2*x, 1
         }
         plane {
           z, 0
         }
         plane {
           -y, -0.05
         }
         scale <1, 1, 0.65>
         translate <0, -1-0.05, -0.3>
       }
     }
     #declare _v = <.7, -1.05, 0.3>;
     #declare _r = 1.53;
     sphere {
       _v, _r
     }
     sphere {
       _v*<-1,1,1>, _r
     }
   }
   //-----elmo
   difference {
     #declare _r2 = 0.015;
     Round_Box_Union (<-0.25/2, -_r2, -_r2>, <0.25/2, 0.5+_r2, 0.5>, _r2)
     box {
       <-0.1, 0.15, -0.1>,<0.1, 0.45, 0.025>
     }
     #declare ang1 = -10;
     #declare _d = 0.95;
     #declare _h = 1;
     rotate ang1*x
     translate -_d*z-_h*y
   }
   object {
     Round_Box_Union (<-0.25/2, -_r2, -_r2>, <0.25/2, 0.7+_r2, 0.5>, _r2)
     #declare ang2 = 30;
     rotate ang2*x
     translate vrotate (0.5*y, ang1*x)+<0, -_h, -_d>
   }
   intersection {
     object {
       Round_Box_Union (<-0.25/2, _r2, -_r2>, <0.25/2, -0.5, 1>, _r2)
       translate vrotate (0.7*y, ang2*x)+vrotate (0.5*y, ang1*x)+<0, 
-_h, -_d>
     }
     plane {
       z, 0
     }
   }
   object {
     Round_Box_Union (<-0.1, _r2, -0.15>, <0.1, -0.5, 0.2>, _r2)
     translate vrotate (0.7*y, ang2*x)+vrotate (0.5*y, ang1*x)+<0, -_h, -_d>
   }
}

#declare testa2 =
union {
   isosurface {
     function {
       f_rounded_box (
       x, y, z,
       #declare r = 0.015; r,
       (0.15/2+z/0.6*0.15/2)*select (x, 1, 0) + 0.15/2,
       0.8 + 0.15*z/0.35 + (0.4-0.15*0.6/0.35)*(z+0.35)/.25*select (z + 
0.35, 1, 0),
       .6
       )
     }
     contained_by {
       box {
         <-0.15, 0, 0>, <0.15/2, 0.8, -0.6>
       }
     }
     max_gradient 5
     translate (0.15-1.7/2)*x
   }
   isosurface {
     function {
       f_rounded_box (
       x, y, z,
       r,
       (0.15/2+z/0.6*0.15/2)*select (x, 1, 0) + 0.15/2,
       0.8 + 0.15*z/0.35 + (0.4-0.15*0.6/0.35)*(z+0.35)/.25*select (z + 
0.35, 1, 0),
       .6
       )
     }
     contained_by {
       box {
         <-0.15, 0, 0>, <0.15/2, 0.8, -0.6>
       }
     }
     max_gradient 5
     scale <-1,1,1>
     translate -(0.15-1.7/2)*x
   }
   isosurface {
     function {
       f_rounded_box (
       x, y, z,
       r,
       .7,
       0.8 + 0.15*z/0.35,
       .35
       )
     }
     contained_by {
       box {
         <-0.7, 0, 0>, <0.7, 0.8, -0.35>
       }
     }
     max_gradient 5
   }
   intersection {
     #declare R = 2;
     #declare r = 0.015;
     #declare p1 = <-1.7/2+3/2*0.15, 0.65, -0.35>;
     #declare p2 = <0, 0.65, -.7>;
     #declare x1 = p1.x;
     #declare x2 = p2.x;
     #declare y1 = p1.z;
     #declare y2 = p2.z;
     #declare a = 1 + pow ((x1-x2)/(y1-y2), 2);
     #declare b = -2*x1 -(x1-x2)*(x1*x1-x2*x2+y1*y1-y2*y2)/pow(y1-y2, 2) 
+ 2*(x1-x2)/(y1-y2)*y1;
     #declare c = x1*x1 + y1*y1 + pow(x1*x1-x2*x2+y1*y1-y2*y2, 2)/4/pow 
(y1-y2, 2) - y1/(y1-y2)*(x1*x1-x2*x2+y1*y1-y2*y2) -
     R*R;
     #declare x0 = (-b + sqrt (b*b - 4*a*c))/(2*a);
     #declare y0 = 1/2/(y1-y2)*(x1*x1-x2*x2+y1*y1-y2*y2-2*(x1-x2)*x0);
     object {
       Round_Cylinder_Union (0*x, 0.5*y, R, r)
       translate <x0, 0, y0>
       translate -p2+0.15*y
       Shear_Trans (x, y-z/4, z)
       translate p2-0.15*y
     }
     plane {
       x, 0
     }
     plane {
       z, -0.3
     }
     translate 0.15*y
   }
   intersection {
     object {
       Round_Cylinder_Union (0*x, 0.5*y, R, r)
       translate <x0, 0, y0>
       translate -p2+0.15*y
       Shear_Trans (x, y-z/4, z)
       translate p2-0.15*y
     }
     plane {
       x, 0
     }
     plane {
       z, -0.3
     }
     translate 0.15*y
     scale <-1,1,1>
   }
   box {
     <-1.7/2, 0, -0.00000001>, <1.7/2, 0.6, 0.3>
     Shear_Trans (x, y, z+y/3)
     translate 0.2*y
   }
   //-----naso
   object {
     Round_Box_Union (<-0.15/2, -r, 0>, <0.15/2, 0.3+r, 0.3>, r)
     Shear_Trans (x, y+z/2, z)
     translate p2+0.035*z
   }
   //-------occhi
   polygon {
     4,
     <0,0>, <0, 0.5>, <-1, 0.5>, <-1, 0>
     rotate 43*y
     translate p2+0.15*z-0.05*x
     #if (USE_TEX) texture {plastica_rossa} #end
   }
   polygon {
     4,
     <0,0>, <0, 0.5>, <-1, 0.5>, <-1, 0>
     rotate 43*y
     translate p2+0.15*z-0.05*x
     scale <-1,1,1>
     #if (USE_TEX) texture {plastica_rossa} #end
   }
   //-----orecchie
   difference {
     union {
       cylinder {
         -1.7/2*x, 1.7/2*x, 0.35
       }
       cone {
         -1.7/2*x, 0.35, -(1.7/2+0.05)*x, 0.3
       }
       cone {
         1.7/2*x, 0.35, (1.7/2+0.05)*x, 0.3
       }
     }
     plane {
       -z, 0
     }
     cylinder {
       -(1.7/2+0.01)*x, -x, 0.05
       translate <0, 0.1, -0.2>
     }
     cylinder {
       -(1.7/2+0.01)*x, -x, 0.05
       translate <0, -0.1, -0.2>
     }
     cylinder {
       -(1.7/2+0.01)*x, -x, 0.05
       translate <0, 0.1, -0.2>
       scale <-1,1,1>
     }
     cylinder {
       -(1.7/2+0.01)*x, -x, 0.05
       translate <0, -0.1, -0.2>
       scale <-1,1,1>
     }
     box {
       <-1, -0.05, 0>, <-1.7/2-0.01001, 0.05, -0.2>
       translate <0, 0.1, -0.2>
     }
     box {
       <-1, -0.05, 0>, <-1.7/2-0.01001, 0.05, -0.2>
       translate <0, -0.1, -0.2>
     }
     box {
       <-1, -0.05, 0>, <-1.7/2-0.01001, 0.05, -0.2>
       translate <0, 0.1, -0.2>
       scale <-1,1,1>
     }
     box {
       <-1, -0.05, 0>, <-1.7/2-0.01001, 0.05, -0.2>
       translate <0, -0.1, -0.2>
       scale <-1,1,1>
     }
     translate <0, 1, 0.3>
   }
}

#declare testa3 =
union {
   difference {
     Round_Box_Union (<-1.7/2, -0.2, -0.2>, <1.7/2, 2.1, 0.35>, r2)
     plane {
       z, 0
     }
     cylinder {
       -0.2*z, 0.5*z, 1
       scale <1.7/2-0.2, 2.1-1.05-0.1, 1.5*10>
       translate 2.1*y
     }
     cylinder {
       -0.1*z, 0.4*z, 0.25
       translate 1.25*y
     }
   }
   box {
     <-1.7/2, 0, 0>, <1.7/2, -0.3, 0.3>
     Shear_Trans (x, y, z+y/3)
     translate <0, 0.2-_eps, -0.3+1e-6>
   }
   difference {
     union {
       cylinder {
         -1.7/2*x, 1.7/2*x, 0.35
       }
       cone {
         -1.7/2*x, 0.35, -(1.7/2+0.05)*x, 0.3
       }
       cone {
         1.7/2*x, 0.35, (1.7/2+0.05)*x, 0.3
       }
     }
     plane {
       z, 0
     }
     cylinder {
       -0.1*z, 0.4*z, 0.25
       translate .25*y
     }
     translate y
   }
   intersection {
     box {
       <-1.5/2, 2.1-0.05, 0>, <1.5/2, 1, .35>
     }
     sphere {
       _v+2.1*y, _r
     }
     sphere {
       _v*<-1,1,1>+2.1*y, _r
     }
     cylinder {
       -0.1*z, 0.4*z, 0.25
       translate 1.25*y
       inverse
     }
   }
   object {
     vite
     rotate ran()*360*y
     rotate 90*x
     translate 1.25*y
   }
   difference {
     Round_Box_Union (<-1, 0, 0.35>, <1, -1, -1.1>, 0.01)
     box {
       <-0.5, 0.001, 0>, <0.5, -0.2, -0.2>
       rotate 45*x
       translate -z
     }
   }
}

#declare testa =
union {
   object {
     testa1 translate 2.1*y
   }
   object {
     testa2 translate -0.3*z
   }
   object {
     testa3 translate _eps*z
     #if (USE_TEX) texture {t_testa_posteriore} #end
   }
   #if (USE_TEX) texture {t_testa_anteriore} #end
}

Argh, I'm gonna hate numbers... quad, triangolo and norm are very... 
very... *basic* macros.

Cheers!

--
Jonathan.


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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