POV-Ray : Newsgroups : povray.newusers : Translate and scale problem in union of objects Server Time
22 Dec 2024 21:55:14 EST (-0500)
  Translate and scale problem in union of objects (Message 1 to 2 of 2)  
From: gregtom6
Subject: Translate and scale problem in union of objects
Date: 6 Apr 2011 08:20:00
Message: <web.4d9c59bae8c7bf88dca78c960@news.povray.org>
Hy everybody!

I have a big problem. In Moray, I positioned and scaled an object(a sphere) with
the following coordinates in this code:
scale <13,13,13>      //scale:13  u-scale:13   clear:13
translate <6.5,-59.2,5.3>

Because of there're a lot of objects need to scale and translate the same way, I
put them in an union. So every object have unique scale and translate values,
and the sphere must have those scale and translate values, as you see upper.

The problem is, I can't reproduce that the sphere and the objects grow
bigger(with uniform scale), and translate to where they need to translate.

All in all, I need somehow to translate and scale the union, and in that, the
sphere finally must have the values you see upper, with the union translate and
scale operations. Help me with that. Thanks.
(DO NOT MODIFIE the objects own transformation values, because without the
union, that good in that position. There are too much objects to transform each
one separately.)


The mentioned union is this:

union { // Group006
  sphere { // Sphere002
    <0,0,0>,1
    material {
      bolygo
    }
    //no_shadow
    //no_image
    /*no_reflection
    double_illuminate
    hollow
    photons {
      collect off
      pass_through
    }*/
    translate  <5.5, -9.2, 4.3>
    scale<13,13,13>
    //translate  <5.6, -9.1, >
  }
superellipsoid { // SuperQ090
  <0.1, 1.161>
  material {
    Meteor
  }
  scale <-0.05, 0.05, 0.05>
  rotate <120.0, 15.0, -50.0>
  translate  <6.6, -7.8, 4.1>
}


superellipsoid { // SuperQ091
  <0.1, 1.161>
  material {
    Meteor
  }
  scale <-0.05, 0.05, 0.05>
  rotate <70.0, -75.0, -30.0>
  translate  <6.7, -7.9, 3.9>
}


superellipsoid { // SuperQ092
  <0.1, 1.161>
  material {
    Meteor
  }
  scale <-0.05, 0.05, 0.05>
  rotate <-150.0, -50.0, -40.0>
  translate  <7.1, -8.4, 4.2>
}


superellipsoid { // SuperQ093
  <0.1, 1.161>
  material {
    Meteor
  }
  scale <-0.05, 0.05, 0.05>
  rotate <-175.0, -50.0, -100.0>
  translate  <6.5, -7.8, 3.9>
}


superellipsoid { // SuperQ094
  <0.1, 1.161>
  material {
    Meteor
  }
  scale <-0.05, 0.05, 0.05>
  rotate <-10.0, -30.0, 0.0>
  translate  <7.1, -8.3, 4.0>
}
translate  <1, -50, 1>
scale <13,13,13>
}


Post a reply to this message

From: gregtom6
Subject: Re: Translate and scale problem in union of objects
Date: 6 Apr 2011 11:30:01
Message: <web.4d9c866bf8c7aa1cdca78c960@news.povray.org>
"gregtom6" <gre### [at] freemailhu> wrote:
> Hy everybody!
>
> I have a big problem. In Moray, I positioned and scaled an object(a sphere) with
> the following coordinates in this code:
> scale <13,13,13>      //scale:13  u-scale:13   clear:13
> translate <6.5,-59.2,5.3>
>
> Because of there're a lot of objects need to scale and translate the same way, I
> put them in an union. So every object have unique scale and translate values,
> and the sphere must have those scale and translate values, as you see upper.
>
> The problem is, I can't reproduce that the sphere and the objects grow
> bigger(with uniform scale), and translate to where they need to translate.
>
> All in all, I need somehow to translate and scale the union, and in that, the
> sphere finally must have the values you see upper, with the union translate and
> scale operations. Help me with that. Thanks.
> (DO NOT MODIFIE the objects own transformation values, because without the
> union, that good in that position. There are too much objects to transform each
> one separately.)
>
>
> The mentioned union is this:
>
> union { // Group006
>   sphere { // Sphere002
>     <0,0,0>,1
>     material {
>       bolygo
>     }
>     //no_shadow
>     //no_image
>     /*no_reflection
>     double_illuminate
>     hollow
>     photons {
>       collect off
>       pass_through
>     }*/
>     translate  <5.5, -9.2, 4.3>
>     scale<13,13,13>
>     //translate  <5.6, -9.1, >
>   }
> superellipsoid { // SuperQ090
>   <0.1, 1.161>
>   material {
>     Meteor
>   }
>   scale <-0.05, 0.05, 0.05>
>   rotate <120.0, 15.0, -50.0>
>   translate  <6.6, -7.8, 4.1>
> }
>
>
> superellipsoid { // SuperQ091
>   <0.1, 1.161>
>   material {
>     Meteor
>   }
>   scale <-0.05, 0.05, 0.05>
>   rotate <70.0, -75.0, -30.0>
>   translate  <6.7, -7.9, 3.9>
> }
>
>
> superellipsoid { // SuperQ092
>   <0.1, 1.161>
>   material {
>     Meteor
>   }
>   scale <-0.05, 0.05, 0.05>
>   rotate <-150.0, -50.0, -40.0>
>   translate  <7.1, -8.4, 4.2>
> }
>
>
> superellipsoid { // SuperQ093
>   <0.1, 1.161>
>   material {
>     Meteor
>   }
>   scale <-0.05, 0.05, 0.05>
>   rotate <-175.0, -50.0, -100.0>
>   translate  <6.5, -7.8, 3.9>
> }
>
>
> superellipsoid { // SuperQ094
>   <0.1, 1.161>
>   material {
>     Meteor
>   }
>   scale <-0.05, 0.05, 0.05>
>   rotate <-10.0, -30.0, 0.0>
>   translate  <7.1, -8.3, 4.0>
> }
> translate  <1, -50, 1>
> scale <13,13,13>
> }

Ok, I finally did this, with Moray. But that took a few hours...


Post a reply to this message

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