POV-Ray : Newsgroups : povray.general : scaling unions Server Time
31 Oct 2024 16:17:18 EDT (-0400)
  scaling unions (Message 1 to 6 of 6)  
From: Hexhall
Subject: scaling unions
Date: 24 May 2020 22:20:01
Message: <web.5ecb2a35fb4f9f8647ce6450@news.povray.org>
I have a union object that is made up of a cylinder with two spheres, one sphere
on each end of the cylinder. (This has to be the case, because it is output from
another program).  I would like to scale this object, stretching it in the
direction of the axis of the cylinder, but I would like to prevent the
dimensions of the spheres being affected.  Is there any easy way to do this with
this union?  Right now, the only option I think is viable is to write a program
(I would use c++) and read such unions from an .inc file and write three
separate objects in place of the union.  Is there any keyword that prevents
dimensions of objects being affected in unions, but allows their positions to
change when a scale is being applied?


Post a reply to this message

From: jr
Subject: Re: scaling unions
Date: 25 May 2020 05:50:01
Message: <web.5ecb949fd63014244d00143e0@news.povray.org>
hi,

"Hexhall" <n/a> wrote:
> I have a union object that is made up of a cylinder with two spheres, one sphere
> on each end of the cylinder. (This has to be the case, because it is output from
> another program).  I would like to scale this object, stretching it in the
> direction of the axis of the cylinder, but I would like to prevent the
> dimensions of the spheres being affected.  Is there any easy way to do this with
> this union?

other than manually elongating the cylinder and moving one sphere by hand, no,
to the best of my knowledge.

>  Right now, the only option I think is viable is to write a program
> (I would use c++) and read such unions from an .inc file and write three
> separate objects in place of the union.  Is there any keyword that prevents
> dimensions of objects being affected in unions, but allows their positions to
> change when a scale is being applied?

not aware of such a keyword/function, sorry.  if you can conceive of a solution
in SDL, it would be interesting if you posted.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: scaling unions
Date: 25 May 2020 06:50:00
Message: <web.5ecba243d6301424fb0b41570@news.povray.org>
"Hexhall" <n/a> wrote:
> I have a union object that is made up of a cylinder with two spheres, one sphere
> on each end of the cylinder.

The only (practical) thing I can see doing is cutting your object in two,
translating one or either end along the axis, and pasting a new cylinder into
the gap to cover up the hack-job.
To get it looking right, if it's a mesh or something, you could cut it into 3,
and scale the central cylinder to fill the gap.



> Is there any keyword that prevents
> dimensions of objects being affected in unions, but allows their positions to
> change when a scale is being applied?

That would indeed be a cool feature to have - "un-union".


But that's the best I can think of right now.


Post a reply to this message

From: Hexhall
Subject: Re: scaling unions
Date: 25 May 2020 09:20:01
Message: <web.5ecbc5b0d630142447ce6450@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Hexhall" <n/a> wrote:
> > I have a union object that is made up of a cylinder with two spheres, one sphere
> > on each end of the cylinder.
>
> The only (practical) thing I can see doing is cutting your object in two,
> translating one or either end along the axis, and pasting a new cylinder into
> the gap to cover up the hack-job.
> To get it looking right, if it's a mesh or something, you could cut it into 3,
> and scale the central cylinder to fill the gap.
>
>
>
> > Is there any keyword that prevents
> > dimensions of objects being affected in unions, but allows their positions to
> > change when a scale is being applied?
>
> That would indeed be a cool feature to have - "un-union".
>
>
> But that's the best I can think of right now.

Thanks for the input, you are right, it would be a cool feature to have an
"un-union" that would shield things like size and/or position in a union group.
Looks like I will have to write a c++ program for my particular situation....


Post a reply to this message

From: Bald Eagle
Subject: Re: scaling unions
Date: 25 May 2020 15:10:00
Message: <web.5ecc17bed6301424fb0b41570@news.povray.org>
> Thanks for the input, you are right, it would be a cool feature to have an
> "un-union" that would shield things like size and/or position in a union group.
> Looks like I will have to write a c++ program for my particular situation....

Well, I have questions-

> > > I have a union object that is made up of a cylinder with two spheres, one sphere
> > > on each end of the cylinder.

If you have a "union object" - what exactly does that mean?
You have a mesh that has been generated from the union of 2 spheres and a
cylinder in a separate program?

If you are trying to render that in POV-Ray, why not just ... do it in POV-Ray?
All you need are coordinates and dimensions, and you can render it "fresh".

Just trying to save you a lot of unnecessary work, if there's a better way.


Post a reply to this message

From: Hexhall
Subject: Re: scaling unions
Date: 25 May 2020 22:50:00
Message: <web.5ecc82fad630142447ce6450@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> > Thanks for the input, you are right, it would be a cool feature to have an
> > "un-union" that would shield things like size and/or position in a union group.
> > Looks like I will have to write a c++ program for my particular situation....
>
> Well, I have questions-
>
> > > > I have a union object that is made up of a cylinder with two spheres, one
sphere
> > > > on each end of the cylinder.
>
> If you have a "union object" - what exactly does that mean?
> You have a mesh that has been generated from the union of 2 spheres and a
> cylinder in a separate program?
>
> If you are trying to render that in POV-Ray, why not just ... do it in POV-Ray?
> All you need are coordinates and dimensions, and you can render it "fresh".
>
> Just trying to save you a lot of unnecessary work, if there's a better way.

It is not just one such union object, it is hundreds, if not thousands, of these
objects, and using pov-ray to generate them would be very difficult, and a!so
much slower than just using the external program.  If not for these issues, your
solution would be the way to go.  Thanks anyways!


Post a reply to this message

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