I'm trying to convert some math / formulas
But the spirals aren't closing / connecting in Blender 2.83.x. See image below along with snippet of code / formula.
Snippet of python code in Blender 2.83.x:
# fill verts array num_x=40 num_y=40 for i in range (0, num_x): for j in range(0,num_y): n = 5 #loop_num loop_pos = 2 u = loop_pos+(i*2*math.pi/num_x) v = 2*math.pi*(j/(num_y-1)-1/2) x = (uval_R_bg+uval_r_sm*math.cos(n*u))*math.cos(u) y = (uval_R_bg+uval_r_sm*math.cos(n*u))*math.sin(u) z = uval_r_sm*math.sin(n*u)
My goal is to convert the formula below in Blender 2.83.x using python and animate it.
An example of what it does can be found here https://demonstrations.wolfram.com/ToroidalHelicalCoils/