Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Xpresso: scale objects in relation to the distance between 2 Points

  • Xpresso: scale objects in relation to the distance between 2 Points

    Posted by Oskar Ziemba on September 20, 2013 at 2:16 pm

    Hello forum,

    i need help with xpresso:

    for an info-graphic i want to show the relationship between three different objects as a pythagorean triangle (see included picture).

    The idea is to show the relationship between object A and object B, while C stays the same. That means if Object A gets smaller, object B has to scale bigger in order to keep the 90° angle between the two. (Actually object A and B are more complex than the cubes in the example picture, these are just placeholders for a block with a house/factory etc. on it.)

    So my idea was to tie the points that connect the corners between A and B together and then measure the distance between the points on the corners of A/B and A/C and use that ratio to scale both objects. There may be better ways than this and i would be grateful, if someone could point me into the right direction. Since i am new to xpresso, i don’t even know which nodes to add. I thought vectors may be a good way to start, but i have no idea how to build something like that in xpresso. Also i want the corner of A/B to stay on that spline in order to keep the 90° angle.

    I hope you understand my projekt and i will be very grateful for everybody who is taking the time to school me.

    Have a good time, Oskar

    6537_pythagoras.jpg.zip

    Oskar Ziemba replied 12 years, 10 months ago 3 Members · 6 Replies
  • 6 Replies
  • Adam Trachtenberg

    September 20, 2013 at 6:10 pm

    This is an ultra-simple setup, but if I understand what you’re saying correctly it does what you want it to do: 6540_inversescaling.c4d.zip

  • Brian Jones

    September 20, 2013 at 7:17 pm

    this uses nulls, one to follow the circle spline and one each for the area so they will stay at the corners of the hypotenuse area and rotate from there. The corner nulls use a target tag to point at the spline null (they were lined up that way to start) XPresso is only used to find the distance from each corner null to the moving null then dividing that by the original area object width to feed to scale of the null.

    6542_pythagorus.c4d.zip

  • Adam Trachtenberg

    September 20, 2013 at 7:48 pm

    You win. 😉

  • Brian Jones

    September 20, 2013 at 7:50 pm

    maybe this time, but that’s a reverse to the normal 🙂

  • Oskar Ziemba

    September 21, 2013 at 12:29 am

    Hello Adam & Bryan,

    thanks for the quick replies. I downloaded both and will look into them tomorrow (it is 2 in the morning).
    All the best,
    Oskar

  • Oskar Ziemba

    September 21, 2013 at 1:25 pm

    Many thanks Brian,

    this works like a charm. You saved me a lot of time.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy