|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello all,
I'm traying to double this objecte like a bridge, but I only want to double
in the middle of it, the extremes should be straights. I don't know who can
I do it. Can anyone help me?
The code is:
====================================
#include "colors.inc"
#include "textures.inc"
camera { location <0, 0, -23> look_at <0, 0, 0> focal_point <-15, -9, 0> }
light_source { <-5, 2, -15> color rgb <2, 2, 2> }
light_source { <10, 2, 0.> color rgb <1, 1, 1> }
background { color White }
#macro Cuc (How_many_blobs)
#local HM_Blobs_remanente = How_many_blobs ;
blob {
threshold .6
#while (HM_Blobs_remanente>0)
sphere { <0, HM_Blobs_remanente*1.2 ,0> 1 , 1 }
#local HM_Blobs_remanente = HM_Blobs_remanente-1 ;
#end
scale 0.5
pigment { Gray*0.75 }
finish { phong .4 }
}
#end
object { Cuc (8) rotate z*105 translate <-8, -5, 0> }
=================================
Thanks in advance,
Oleguer
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
you canscale the same object by -x. This will mirror the object in the YZ
plane.
object { Cuc (8) rotate z*105 translate <-8, -5, 0> }
object { Cuc (8) rotate z*105 scale -x translate <-8, -5, 0> }
Greetings
JWV
"Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
news:4136f07d@news.povray.org...
> Hello all,
>
> I'm traying to double this objecte like a bridge, but I only want to
double
> in the middle of it, the extremes should be straights. I don't know who
can
> I do it. Can anyone help me?
>
> The code is:
> ====================================
> #include "colors.inc"
> #include "textures.inc"
>
> camera { location <0, 0, -23> look_at <0, 0, 0> focal_point <-15, -9, 0> }
> light_source { <-5, 2, -15> color rgb <2, 2, 2> }
> light_source { <10, 2, 0.> color rgb <1, 1, 1> }
> background { color White }
>
>
> #macro Cuc (How_many_blobs)
> #local HM_Blobs_remanente = How_many_blobs ;
>
> blob {
> threshold .6
> #while (HM_Blobs_remanente>0)
>
> sphere { <0, HM_Blobs_remanente*1.2 ,0> 1 , 1 }
>
> #local HM_Blobs_remanente = HM_Blobs_remanente-1 ;
>
> #end
> scale 0.5
> pigment { Gray*0.75 }
> finish { phong .4 }
> }
> #end
>
> object { Cuc (8) rotate z*105 translate <-8, -5, 0> }
> =================================
>
> Thanks in advance,
> Oleguer
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
No, maybe my explanation wasn't correct.
I want to turn it like a bridge, I want to make and angle in the middle of
the object and keep the ends of the object straight.
Well I thinks thats better than the other.
Thanks,
Oleguer
news:41374812$1@news.povray.org...
> you canscale the same object by -x. This will mirror the object in the YZ
> plane.
>
> object { Cuc (8) rotate z*105 translate <-8, -5,
> }
> object { Cuc (8) rotate z*105 scale -x translate <-8, -5, 0> }
>
>
> Greetings
>
> JWV
>
>
> "Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
> news:4136f07d@news.povray.org...
> > Hello all,
> >
> > I'm traying to double this objecte like a bridge, but I only want to
> double
> > in the middle of it, the extremes should be straights. I don't know who
> can
> > I do it. Can anyone help me?
> >
> > The code is:
> > ====================================
> > #include "colors.inc"
> > #include "textures.inc"
> >
> > camera { location <0, 0, -23> look_at <0, 0, 0> focal_point <-15, -9,
0> }
> > light_source { <-5, 2, -15> color rgb <2, 2, 2> }
> > light_source { <10, 2, 0.> color rgb <1, 1, 1> }
> > background { color White }
> >
> >
> > #macro Cuc (How_many_blobs)
> > #local HM_Blobs_remanente = How_many_blobs ;
> >
> > blob {
> > threshold .6
> > #while (HM_Blobs_remanente>0)
> >
> > sphere { <0, HM_Blobs_remanente*1.2 ,0> 1 , 1 }
> >
> > #local HM_Blobs_remanente = HM_Blobs_remanente-1 ;
> >
> > #end
> > scale 0.5
> > pigment { Gray*0.75 }
> > finish { phong .4 }
> > }
> > #end
> >
> > object { Cuc (8) rotate z*105 translate <-8, -5, 0> }
> > =================================
> >
> > Thanks in advance,
> > Oleguer
> >
> >
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
you mean you want to bend it in the middle? For as far as i know, you can
not do this without using the bend macro. But i can't find that macro at the
moment, sorry.
JWV
"Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
news:413763bc$1@news.povray.org...
> No, maybe my explanation wasn't correct.
> I want to turn it like a bridge, I want to make and angle in the middle of
> the object and keep the ends of the object straight.
> Well I thinks thats better than the other.
>
> Thanks,
> Oleguer
>
> news:41374812$1@news.povray.org...
> > you canscale the same object by -x. This will mirror the object in the
YZ
> > plane.
> >
> > object { Cuc (8) rotate z*105 translate <-8, -5,
> > }
> > object { Cuc (8) rotate z*105 scale -x translate <-8, -5, 0> }
> >
> >
> > Greetings
> >
> > JWV
> >
> >
> > "Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
> > news:4136f07d@news.povray.org...
> > > Hello all,
> > >
> > > I'm traying to double this objecte like a bridge, but I only want to
> > double
> > > in the middle of it, the extremes should be straights. I don't know
who
> > can
> > > I do it. Can anyone help me?
> > >
> > > The code is:
> > > ====================================
> > > #include "colors.inc"
> > > #include "textures.inc"
> > >
> > > camera { location <0, 0, -23> look_at <0, 0, 0> focal_point <-15, -9,
> 0> }
> > > light_source { <-5, 2, -15> color rgb <2, 2, 2> }
> > > light_source { <10, 2, 0.> color rgb <1, 1, 1> }
> > > background { color White }
> > >
> > >
> > > #macro Cuc (How_many_blobs)
> > > #local HM_Blobs_remanente = How_many_blobs ;
> > >
> > > blob {
> > > threshold .6
> > > #while (HM_Blobs_remanente>0)
> > >
> > > sphere { <0, HM_Blobs_remanente*1.2 ,0> 1 , 1 }
> > >
> > > #local HM_Blobs_remanente = HM_Blobs_remanente-1 ;
> > >
> > > #end
> > > scale 0.5
> > > pigment { Gray*0.75 }
> > > finish { phong .4 }
> > > }
> > > #end
> > >
> > > object { Cuc (8) rotate z*105 translate <-8, -5, 0> }
> > > =================================
> > >
> > > Thanks in advance,
> > > Oleguer
> > >
> > >
> >
> >
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I'm traying to double this objecte like a bridge, but I only want to
double
> in the middle of it, the extremes should be straights. I don't know who
can
> I do it. Can anyone help me?
If I understand the effect you're going for, you might be able to place the
spheres in a parabolic shape (this code hasn't been tested):
#declare Bridge_Width = 5.0; // set to whatever
#declare Bridge_Height = 2.0; // set to whatever
#while (HM_Blobs_remanente>0)
#local blobnum = HM_Blobs_remanente - 1; // (easier to start with index 0)
#local blobamnt = blobnum / (How_many_blobs-1) // (number from 0.0 to 1.0)
#local blobamnt = blobamnt * 2.0 - 1.0; // (now from -1.0 to 1.0)
sphere { <blobamnt * Bridge_Width*0.5, (1-pow(blobamnt,2)) * Bridge_Height,
0> 1 , 1 }
#local HM_Blobs_remanente = HM_Blobs_remanente-1 ;
#end
This will place the spheres along a curved path from <-Bridge_Width/2,0,0>
to <0,Bridge_Height,0> to <Bridge_Width/2,0,0>.
The tricky part is the (1-pow(blobamnt,2)), which takes a number from -1 to
1 (which represents how far across the bridge the current blob sphere is),
squares it (to get a number from 0 to 1, higher at the edges of the bridge)
and then subtracts that from one (to get a number from 0 to 1, now lower at
the edges of the bridge).
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Slime,
Your code gives a parse error here: "#while (HM_Blobs_remanente>0)". I'm
traying to find out the reason.
Don't worry about that JWV.
Thank you,
Oleguer
news:41377955$1@news.povray.org...
> > I'm traying to double this objecte like a bridge, but I only want to
> double
> > in the middle of it, the extremes should be straights. I don't know who
> can
> > I do it. Can anyone help me?
>
>
> If I understand the effect you're going for, you might be able to place
the
> spheres in a parabolic shape (this code hasn't been tested):
>
> #declare Bridge_Width = 5.0; // set to whatever
> #declare Bridge_Height = 2.0; // set to whatever
>
> #while (HM_Blobs_remanente>0)
> #local blobnum = HM_Blobs_remanente - 1; // (easier to start with index
0)
> #local blobamnt = blobnum / (How_many_blobs-1) // (number from 0.0 to
1.0)
> #local blobamnt = blobamnt * 2.0 - 1.0; // (now from -1.0 to 1.0)
>
> sphere { <blobamnt * Bridge_Width*0.5, (1-pow(blobamnt,2)) *
Bridge_Height,
> 0> 1 , 1 }
>
> #local HM_Blobs_remanente = HM_Blobs_remanente-1 ;
> #end
>
> This will place the spheres along a curved path from <-Bridge_Width/2,0,0>
> to <0,Bridge_Height,0> to <Bridge_Width/2,0,0>.
>
> The tricky part is the (1-pow(blobamnt,2)), which takes a number from -1
to
> 1 (which represents how far across the bridge the current blob sphere is),
> squares it (to get a number from 0 to 1, higher at the edges of the
bridge)
> and then subtracts that from one (to get a number from 0 to 1, now lower
at
> the edges of the bridge).
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|