Jump to content

To deform a curve and keep it's length


peliosis

Recommended Posts

Hello,

I'm trying to write an operator which control the curve by rotating each point by some given angle (point attribute) around previous point.

After some testing I hit a problem because it doesn't keep segment lengths.

This is it:

P = 0;
for (i=0; i<Npt; i++)
	{
	if (ptnum >= i)
		{
		P += cossin;														   // WYSIWYG :)
		angle = ang*multip;												//multiplier parameter to experiment more freely
		cossin = normalize(set(cos(-angle), sin(-angle) ,0));  // normalize just to BE sure:)
		}
	}

It's just about the same as : P+=cossin;

What to do with it? Segment lengths change along with difference between angle attribute.

I suppose it does accumulate the cossin vectors, but looks like I'm flushed:( and don't quite get this SIMD thing.

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...