Jump to content

I need help to scale a curve based on a specified point..!


Recommended Posts

Hi everyone,

Could you please take a look at the image below? I'm working on scaling a curve (which isn't at the origin) using VEX code. I need the scaling to be based on point number 0 (@ptnum = 0).

Does anyone have any ideas or suggestions on how to approach this?

Thanks in advance!

Scale.jpg

Scale.hip

Link to comment
Share on other sites

These codes helped me to achieve it:
 

vector T = chv("T");
vector R = chv("R");
vector S = chv("S");

vector pivot = point(0, "P", chi("Point_Number"));

matrix m = maketransform(0,0,T,R,S);
matrix m2 = ident();

translate(m2,-pivot);
m2 *= m;
translate(m2,+pivot);

v@P *= m2;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...