using a sine wave for the curve in an IPO

I want to have certain channels in my IPO follow a sine (or cosine) wave. I didn’t see how to create a (perfect) sine wave in the documentation. Does anyone have any ideas?

Thanks.

Just gotta do it manually and use a little math I think. While in edit mode on one of the lines, you can set the numbers of the verts exactly by hitting N, (guessing you knew this, but wanted to make sure).

Just out of curiosity, why do you want to do this? If you tell us why we may be able to offer an alternative solution.

GreyBeard

Draw the first oscillation (eg: Key1 @ Fr0 0, Key2 @ Fr 50 +1, Key3 @ Fr 100 0, Key4 @ Fr 150 -1, Key 5 @ Fr200 0) then set Extend mode to Cyclic (or Cyclic Extrapolation).

%<

Just out of curiosity, why do you want to do this? If you tell us why we may be able to offer an alternative solution.

Because some of us spend so long staring at them in math class that when we get to Blender, they are the first thing that we think of :)! It would be quite good to be able to make them. You could do things like make an object move in a perfect circle without using a path!

Yeah, I think you’ll just have to do it manually. I don’t see why you can’t make a perfect one with just 3 points in the IPO curve. Like so:

  
._       _.
  \     /
   \_._/

To get it as perfect as possible, you’ll want somehow overlay a sine wave on your screen, like with an overhead transparency. With just those points, you should be able to get it.

And you can draw a cirlce with it to test it :).

I want to do things like have a sphere smoothly expand and contract cyclically, or have things move with smooth acceleration and deceleration. The smoothest cycle in my mind is sine waves.

OK, it sounds like the consensus is that I need to draw this wave manually (possibly with the help of a loaded image).

Thanks.

make an object move in a perfect circle without using a path!

To do this just parent the object to an empty at the radius you want and keyframe the rotation of the empty. Perfect circle – no path.

I want to do things like have a sphere smoothly expand and contract cyclically, or have things move with smooth acceleration and deceleration.

The bezier curves in the IPO editor do this fine, You wouldn’t notice any difference than with using a sine curve. Beziers are standard practice for this type of thing in almost all 3d packages.

OK, it sounds like the consensus is that I need to draw this wave manually (possibly with the help of a loaded image).

If you really need a sine curve just add a circle in the 3d window at whatever resolution you want and move the object from vertex to vertex of the circle keyframing as you go.

Do you iron your socks? :wink:

GreyBeard

Lol Greybeard!

Once you’ve made your first sine-wave-shaped-IPO you can save it as a Fake and keep it in your B.blend as a primative and you’ll never have to make another one, just scale it to the shape you need.

%<

You could probably write a python script that would do something like this:

Loop
x++;
AddVertex(x,Sin(X));

(obviously this is not valid Python since I don’t know python or the Python APIs but it probably wouldn’t be hard to write a script that plots all kinds of basic functions in blender meshes)

well i don’t … but,
wait until mass-spring system for softbodies is out …
you ’ ll want to have a clean sinoid to avoid extra jiggle.

have fun

BM