|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi all,
I've done this arrow:
======================================
union {
cone { <0,0,0>,2,<3,0,0>,0 }
cylinder { <-5,0,0>,<0,0,0>,1 }
pigment { color Gray*1.2 }
scale <3, 1.6, 1>
scale 0.5
rotate <0, 0, -90>
}
======================================
Now I was thinking how can I turn the cylinder like a bridge.
I thought that using a spline would work, but I'm not sure if it's the
easiest way, because I think should be another easier way to turn the
Using this:
#local yPos = Ampl*sin(xFreq*xCnt/xNr*2*pi)*cos(zFreq*zCnt/zNr*2*pi);
and then declaring:
#declare Amplitude = 30;
to make the arch.
Any ideas?
Thanks in advance,
Oleguer
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Now I was thinking how can I turn the cylinder like a bridge.
Will a segment of a torus do? You can intersect a torus with two planes to
get a small piece of it.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Yeah, good idea Slime! I haven't thought it.
But, should be a way to turn the cylinder like a half torus and I don't know
how can I do it.
Best regards,
Oleguer
news:42e0d4a1$1@news.povray.org...
>> Now I was thinking how can I turn the cylinder like a bridge.
>
> Will a segment of a torus do? You can intersect a torus with two planes to
> get a small piece of it.
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Investiga con matrix keyword, tal vez no sea exactamente lo que buscas, pero
http://enphilistor.users4.50megs.com/matrix.htm
--
light_source{0,1}#macro C(r,p)cylinder{x*-2,x*2,.9 pigment { rgb
p} /* B Gimeno estoeslarealidad */ rotate p*90 } #end difference
{box {-1,1} C(z /* http://usuarios.lycos.es/game2413 */,x)C(x,y)
C(z,z) pigment{rgb 2} rotate 45 translate z*4} // www.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> But, should be a way to turn the cylinder like a half torus and I don't
know
> how can I do it.
I'm not quite sure what you're asking if my reply didn't answer it.
Let's say you had a cylinder, along the Y axis from <0,0,0> to <0,H,0> with
radius R. You want to curl the cylinder by X degrees towards the x-axis. You
could do it like this:
#declare H = 2;
#declare X = 90;
#declare R = .2;
intersection {
torus {
// we want X/360 * circumference of torus to equal H
#declare MajorRad = H*360/(X*2*pi);
MajorRad,
// minor radius = cylinder's radius
R
}
#if (X < 180)
intersection {
#else
union {
#end
// cut off the bottom
plane {
-z,0
}
// cut off the other end
plane {
z,0
rotate X*y
}
}
translate MajorRad*x
rotate -90*x
pigment {rgb 1}
rotate 90*x
}
It sounds like you want X = 180 if you want "half a torus." Watch what
happens as you bring X from 0 to 90, 180 and even up to 360.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
B. Gimeno <NO_### [at] lycoses> wrote:
> Investiga con matrix keyword, tal vez no sea exactamente lo que buscas, pero
> http://enphilistor.users4.50megs.com/matrix.htm
Matrix transformations can only perform linear transformations. They
can't bend a cylinder into a torus segment.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi all,
Yeah, you've used a torus to do it.
Sorry for the late reply, I was outside of Lleida.
Thanks,
Oleguer
news:42e2ca2c$1@news.povray.org...
>> But, should be a way to turn the cylinder like a half torus and I don't
> know
>> how can I do it.
>
> I'm not quite sure what you're asking if my reply didn't answer it.
>
> Let's say you had a cylinder, along the Y axis from <0,0,0> to <0,H,0>
> with
> radius R. You want to curl the cylinder by X degrees towards the x-axis.
> You
> could do it like this:
>
> #declare H = 2;
> #declare X = 90;
> #declare R = .2;
>
> intersection {
> torus {
> // we want X/360 * circumference of torus to equal H
> #declare MajorRad = H*360/(X*2*pi);
> MajorRad,
> // minor radius = cylinder's radius
> R
>
> }
>
> #if (X < 180)
> intersection {
> #else
> union {
> #end
> // cut off the bottom
> plane {
> -z,0
> }
> // cut off the other end
> plane {
> z,0
> rotate X*y
> }
> }
>
> translate MajorRad*x
> rotate -90*x
>
> pigment {rgb 1}
>
> rotate 90*x
> }
>
> It sounds like you want X = 180 if you want "half a torus." Watch what
> happens as you bring X from 0 to 90, 180 and even up to 360.
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Bruno,
Thanks for the page. I will read it, it looks interesting.
Regards,
Oleguer
news:42e2be48$1@news.povray.org...
> Investiga con matrix keyword, tal vez no sea exactamente lo que buscas,
> pero
> http://enphilistor.users4.50megs.com/matrix.htm
>
> --
> light_source{0,1}#macro C(r,p)cylinder{x*-2,x*2,.9 pigment { rgb
> p} /* B Gimeno estoeslarealidad */ rotate p*90 } #end difference
> {box {-1,1} C(z /* http://usuarios.lycos.es/game2413 */,x)C(x,y)
> C(z,z) pigment{rgb 2} rotate 45 translate z*4} // www.povray.org
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Slime and all,
Using your code like this:
======================================
#declare H = 2;
#declare X = 90;
#declare R = .2;
#declare Fletxa = object {
intersection {
torus {
// we want X/360 * circumference of torus to equal H
#declare MajorRad = H*360/(X*2*pi);
MajorRad,
// minor radius = cylinder's radius
R }
#if (X < 180)
intersection {
#else
union {
#end
// cut off the bottom
plane { -z, 0 }
// cut off the other end
plane { z, 0
rotate X*y } }
translate MajorRad*x
rotate -90*x
pigment { rgb 1 }
rotate 90*x
translate <0, 0, 0> + Direction
}}
#declare Punta = object {
cone { <0,0,0>,0.5,<1.5,0,0>,0
pigment { rgb 1 } }
scale 0.5
translate <0, 6, 0> + Direction
}
union {
object { Fletxa }
object { Punta rotate <0, 90, 0> } }
======================================
How can I calculate the position of the cone the place it exactly on the end
of the torus?
Regards,
Oleguer
news:42ebcc73@news.povray.org...
> Hi all,
>
> Yeah, you've used a torus to do it.
>
> Sorry for the late reply, I was outside of Lleida.
>
> Thanks,
> Oleguer
>
>
>
>
> news:42e2ca2c$1@news.povray.org...
>>> But, should be a way to turn the cylinder like a half torus and I don't
>> know
>>> how can I do it.
>>
>> I'm not quite sure what you're asking if my reply didn't answer it.
>>
>> Let's say you had a cylinder, along the Y axis from <0,0,0> to <0,H,0>
>> with
>> radius R. You want to curl the cylinder by X degrees towards the x-axis.
>> You
>> could do it like this:
>>
>> #declare H = 2;
>> #declare X = 90;
>> #declare R = .2;
>>
>> intersection {
>> torus {
>> // we want X/360 * circumference of torus to equal H
>> #declare MajorRad = H*360/(X*2*pi);
>> MajorRad,
>> // minor radius = cylinder's radius
>> R
>>
>> }
>>
>> #if (X < 180)
>> intersection {
>> #else
>> union {
>> #end
>> // cut off the bottom
>> plane {
>> -z,0
>> }
>> // cut off the other end
>> plane {
>> z,0
>> rotate X*y
>> }
>> }
>>
>> translate MajorRad*x
>> rotate -90*x
>>
>> pigment {rgb 1}
>>
>> rotate 90*x
>> }
>>
>> It sounds like you want X = 180 if you want "half a torus." Watch what
>> happens as you bring X from 0 to 90, 180 and even up to 360.
>>
>> - Slime
>> [ http://www.slimeland.com/ ]
>>
>>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If I do this:
======================================
#declare H = 2;
#declare X = 90;
#declare R = .2;
#declare Fletxa = object {
intersection {
torus {
// we want X/360 * circumference of torus to equal H
#declare MajorRad = H*360/(X*2*pi);
MajorRad,
// minor radius = cylinder's radius
R }
#if (X < 180)
intersection {
#else
union {
#end
// cut off the bottom
plane { -z, 0 }
// cut off the other end
plane { z, 0
rotate X*y } }
translate MajorRad*x
rotate -90*x
pigment { rgb 1 }
rotate 90*x
translate <1.06, -0.7, 0> + Direction*3
rotate <180, 0, 0>
}}
#declare Punta = object {
cone { <0,0,0>,0.5,<1.5,0,0>,0
pigment { rgb 1 } }
scale 0.5
translate <1.5, 3, 0> + Direction*3
rotate <0, 180, 180>
}
union {
object { Fletxa }
object { Punta }
translate <6, 0, 0> + Direction }
======================================
When I translate all the union, the cylinder isn't moving following the
torus. Why? They are into an union, so, the translate vector should move all
the object. Isn't it?
Regards,
Oleguer
news:42edea9c@news.povray.org...
> Hi Slime and all,
>
> Using your code like this:
> ======================================
> #declare H = 2;
> #declare X = 90;
> #declare R = .2;
>
> #declare Fletxa = object {
> intersection {
> torus {
> // we want X/360 * circumference of torus to equal H
> #declare MajorRad = H*360/(X*2*pi);
> MajorRad,
> // minor radius = cylinder's radius
> R }
> #if (X < 180)
> intersection {
> #else
>
> union {
> #end
> // cut off the bottom
> plane { -z, 0 }
> // cut off the other end
> plane { z, 0
> rotate X*y } }
>
> translate MajorRad*x
> rotate -90*x
> pigment { rgb 1 }
> rotate 90*x
> translate <0, 0, 0> + Direction
> }}
>
> #declare Punta = object {
> cone { <0,0,0>,0.5,<1.5,0,0>,0
> pigment { rgb 1 } }
> scale 0.5
> translate <0, 6, 0> + Direction
> }
>
> union {
> object { Fletxa }
> object { Punta rotate <0, 90, 0> } }
> ======================================
> How can I calculate the position of the cone the place it exactly on the
> end of the torus?
>
> Regards,
> Oleguer
>
>
> news:42ebcc73@news.povray.org...
>> Hi all,
>>
>> Yeah, you've used a torus to do it.
>>
>> Sorry for the late reply, I was outside of Lleida.
>>
>> Thanks,
>> Oleguer
>>
>>
>>
>>
>> news:42e2ca2c$1@news.povray.org...
>>>> But, should be a way to turn the cylinder like a half torus and I don't
>>> know
>>>> how can I do it.
>>>
>>> I'm not quite sure what you're asking if my reply didn't answer it.
>>>
>>> Let's say you had a cylinder, along the Y axis from <0,0,0> to <0,H,0>
>>> with
>>> radius R. You want to curl the cylinder by X degrees towards the x-axis.
>>> You
>>> could do it like this:
>>>
>>> #declare H = 2;
>>> #declare X = 90;
>>> #declare R = .2;
>>>
>>> intersection {
>>> torus {
>>> // we want X/360 * circumference of torus to equal H
>>> #declare MajorRad = H*360/(X*2*pi);
>>> MajorRad,
>>> // minor radius = cylinder's radius
>>> R
>>>
>>> }
>>>
>>> #if (X < 180)
>>> intersection {
>>> #else
>>> union {
>>> #end
>>> // cut off the bottom
>>> plane {
>>> -z,0
>>> }
>>> // cut off the other end
>>> plane {
>>> z,0
>>> rotate X*y
>>> }
>>> }
>>>
>>> translate MajorRad*x
>>> rotate -90*x
>>>
>>> pigment {rgb 1}
>>>
>>> rotate 90*x
>>> }
>>>
>>> It sounds like you want X = 180 if you want "half a torus." Watch what
>>> happens as you bring X from 0 to 90, 180 and even up to 360.
>>>
>>> - Slime
>>> [ http://www.slimeland.com/ ]
>>>
>>>
>>
>>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|