# Create a curve on another curve

I wonder how I can make a math curve/path representing an equation along another curve and make a camera follow it?

## Overview:

1. Make sure you have enabled Add Mesh: Extra Objects addon.

2. Add Mesh > Math Function > Z Math Surface.

3. Set up math function:

• Z Equation: sin(x)
• X Subdivision: higher will give you better resolution
• Y Subdivision: set it to the lowest (3)
• X Size: this is your wave length
• Y Size: wave width
4. Go to Edit Mode and delete left and right edge from the mesh.

5. In Object Mode hit Alt+C and Curve from Mesh/Text.
6. You can change Z height by scaling wave in Z axis or finding more suitable equation.

As for the second question you can find several answers here.

## Edit 1:

Curve on Curve.

1. Make sure both objects has set Origin to Center of the Mass.
2. Set cursor to selected 'road' object: Shift+S > Cursor to Selected.
3. Move Sine Wave to Cursor: Shift+S > Selection to Cursor.
4. Add Curve Modifier to Sine Wave, select 'road' path and choose -Y (could be different based on object rotation).
5. Move Sine Wave along Y Axis to position it as you need.

Note:

You have really low units scale in this scene, and thus Math Function can't create big wave (I didn't knew about such limitations). So you need to create Sine wave with maxed X Size and Subdivision and after that Scale object up, or just change scene scale.

## Edit 2:

To properly use Sine Wave with Array Modifier you will need to pay attention while creating the wave to have beginning and end as close to X axis grid line as possible. Remember to check Merge option under Array Modifier and set it to the moment when vertices will join.

And for the Camera Follow Path, you can just use Curve and Array modifiers on unconverted mesh (right after creating and cleaning edges from Z Math), then apply modifiers and after that do step 5. from original answer.

• Thank you. Just a question, How I can modify the mesh parameters after doing another action? Do I need to set it up once it's created and no way to edit those parameters after creation?
– Tak
Jul 2, 2017 at 17:30
• @Tak It's the same as with any other object in Blender, you have only one shot ;) Jul 2, 2017 at 17:32
• Thank you :) so what if I want it to be curved not in a straight line?
– Tak
Jul 2, 2017 at 17:36
• @tak, you need to give me some example of what you want to achieve exactly. Jul 2, 2017 at 17:38
• It's like a street or road which turns right and left, and I want a camera to follow a curve which has a sin wave in the z direction but follows the curved road along x-y
– Tak
Jul 2, 2017 at 17:40