0
$\begingroup$

Ok I found this question with no answers - Sine wave on a ring and How do I make a curve in the shape of a simple wave form (sine)? to make a sine curve. I need what the first question asked for -

I now have the sine wave curve, but I need it to go around in a circle. How can I achieve this?

EDIT: enter image description here

$\endgroup$
2
  • $\begingroup$ Glad you fixed it, but.. I've been trying to reproduce this.. and can't! I'm curious about how you managed to lose the axis option? $\endgroup$
    – Robin Betts
    Jan 27, 2019 at 18:20
  • $\begingroup$ old version! of blender $\endgroup$
    – blue
    Jan 28, 2019 at 20:48

2 Answers 2

3
$\begingroup$

Via the UI:

Simple Deform... modifier.

for any sine wave with a whole number of cycles, created aligned to world axes

  • Bend
  • 360 degrees
  • In the wave's Object-Space axis of amplitude.

enter image description here

$\endgroup$
0
3
$\begingroup$

Simple script

Translate the circle primitive into a sine wave. The primitive circle distributes the verts x, y coords in a circle.

The z coordinate is adjusted to oscillate in a sine wave.

enter image description here

import bpy
from math import sin, pi
verts = 128 #  verts per circle
radius = 1 # radius of circle
freq = 16   #  how many phases of sin wave
amp = 0.1   # amplitude of wave
# angle per vert
apv = freq * 2 * pi / (verts)

context = bpy.context
bpy.ops.mesh.primitive_circle_add(
        vertices=verts,
        radius=radius)
ob = context.object
me = ob.data
for v in me.vertices:
    v.co.z = amp * sin(v.index * apv)
me.update()
$\endgroup$
1
  • 1
    $\begingroup$ Thank you for answering. I am learning Python by studying examples like yours. $\endgroup$ Jan 27, 2019 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .