sin movement

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  03 March 2006
sin movement

im trying to make an object move in a sin wave (in z up down) when you move it in a direction (y for example) with wire parameters.

i tried connecting them with:

x_postion*sin(80) but it moved i a straight line. i cant figures out what i do wrong

sry for my noobness
__________________
www.onesize.nl
-----------------
Yeah right! sure...
 
  03 March 2006
You need to also adjust the y or z position. Here is a basic sine wave example:

wave_amplitude = 60
wave_width = 10
x_position = 0

for i = 1 to 360 do (
y_position = sin(x_position) * amplitude
x_position += wave_width -- or time, whatever
obj.pos.y = y_position
obj.pos.x = x_position
)



I'm sure there might be more simple examples, but this is just off the top of my head.
__________________
______________________
Jason Hayes
Technical Artist
THQ/Volition
 
  03 March 2006
it says:

imcompatible types: 0,0 and undifined

tnx for the help and im gonna study the expressions tuts, cos im kinda new to the whole scripting thing. But i think i have to learn it, cos it helps animating things faster.
__________________
www.onesize.nl
-----------------
Yeah right! sure...
 
  03 March 2006
hvanzon i got it to work the way it was suggested in your other thread, the cube sat on it's corner when at 45°, and on it's side when at 90°, but inbetween it didn't work out right, it didn't really stick to the floor when close to 45

it may be i did something wrong but my guess is the the sin stuff may not be enough
__________________
Kai Stavginski

www.Aearon.de

"There's nothing to it but to do it!"
 
  03 March 2006
Aeron your absolutely right. It isnt a sin, cos or whatever.



i made the movement and it comes to this. Is this doable or is it real hard?
__________________
www.onesize.nl
-----------------
Yeah right! sure...
 
  03 March 2006
btw your Dependency Graph Beta is really cool.
__________________
www.onesize.nl
-----------------
Yeah right! sure...
 
  03 March 2006
thanks man, most of the work is really done by kees' amazing helium plugin, it's just fun scripting on top of that thing, i hope i'll find the time to work some more on this soon


as for this rolling cube thing, actually if you look at it it sure is a circular movement (the path is a quarter of a circle, so coming up with an acurate formula for this should definitely be possible (for someone who know's how to come up with formula's)
__________________
Kai Stavginski

www.Aearon.de

"There's nothing to it but to do it!"
 
  03 March 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:07 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.