Is there a way to calculate things "in a row"?
For an oscilating effect I'm using a sin function to change the x-position of several points which are lined up in a row. As I need to keep the length of this point chain constant I need to move the points on the z-axis as the chain length increases by the x-axis displacement.
What I need to do is set the position of the first point (x-axis), than calculate the position of the second point (x-axis) and afterwards move the second point on the (z-axis) to keep the initial distance to the first point. Then the position of the third point on the x-axis gets calculated. Its z-position depends on the second point, but although on the first point which is responsible for the y-movement of the second point.
This continues to the last point of the chain.
How would I set up an ice tree to solve this problem. So far each point got its own ice tree. Probably there is a way to put all the calculations in one, but so far I would need to find a way first to keep the chain length stable (keep the distance from point to point constant)
Any help is appreciated.
Cheers
Pancho
Change positions in dependance
-
grahamef
- Posts: 281
- Joined: 23 Jun 2009, 19:01
Re: Change positions in dependance
It might be easier conceptually if you deformed a curve by the sine function, and then placed the points at evenly spaced distances along it.
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Change positions in dependance
Thanks, that's what I did in the meantime. Good thing is that the curve gets deformed by the bones before the oscilation starts. So the oscilation takes place along the "spine".
The only thing which worries me right now is that if I set up my bone chain from z to -z the orientation of the bones somehow changes the orientation of my "swinging" nulls. Actually (globally) they are swinging in the x-axis. As soon as they are parented to the bones I need to change their z-position to maintain the swinging axis. Somehow this looks like a bad set up to me. Is that the way it is or do I have to change some kind of orientation or setting? The head of the fish is located around the origin and the tail moves towards the -z direction. Is there a special way to set this up properly?
Cheers
Pancho
The only thing which worries me right now is that if I set up my bone chain from z to -z the orientation of the bones somehow changes the orientation of my "swinging" nulls. Actually (globally) they are swinging in the x-axis. As soon as they are parented to the bones I need to change their z-position to maintain the swinging axis. Somehow this looks like a bad set up to me. Is that the way it is or do I have to change some kind of orientation or setting? The head of the fish is located around the origin and the tail moves towards the -z direction. Is there a special way to set this up properly?
Cheers
Pancho
-
grahamef
- Posts: 281
- Joined: 23 Jun 2009, 19:01
Re: Change positions in dependance
You might be running into an issue related to the fact that data like pointposition that you look up at a location is expressed relative to the object with the ICE tree, so you may need to convert between reference frames as appropriate.
If that's not it, then maybe you can post a pic of your ICE tree and the results you are getting. I'm having a hard time picturing it in my head.
gray
If that's not it, then maybe you can post a pic of your ICE tree and the results you are getting. I'm having a hard time picturing it in my head.
gray