Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Alright so backstory as brief as I can.
I can create a spiral wrapping around the X axis with
X = T
Y = sin(T)
Z = cos(T)
Problem is, what if I want that spiral to wrap around a curve like this?
I can't just add the curve's position to the spiral's, that just gets me this funny looking thing. I think I also need to rotate each point on the spiral around the corresponding point on the curve. That part I don't know how to do. I can get the position of each point on the curve and the tangent of each point, I just don't know how to take that info and actually rotate one point around another in 3D space. Any ideas?
"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto
Offline
i'm not 100% sure and i'm a bit out of practice here but my guess is like this
arclength parametrized curve
(x,y,z) = F(s)
Frenet frame
unit tangent vector = T(s) = F'(s) / ||F'(s)||
unit normal vector = N(s) = T'(s) / ||T'(s)||
unit binormal vector = B(s) = T(s) x N(s)
spiral curve S
S(s) = F(s) + sin(s) * N(s) + cos(s) * B(s)
or something like this maybe, i'll look more at it later
Offline
forwarded this to a friend, he replied with this:
~~~
You will need to add a path to the scene.
Then you need to select your object you want to spiral on. Add a "curve" modifier. And set it to the path you added to the blender area thingy.
~~~
i have no idea what any of this means lol
can you get the relative position of a point on that curve and the length of the curve? so like if the curve would be a curved coordinate axis, you would be able to get the coordinate of that point on the axis (lets call it P-axis, also im having a really hard time wording this)
so like, the P coordinate should be 0 at the beginning of the curve and eiither 1 or the curve's length at it's end
BASICALLY ANOTHER ATTEMPT TO WORD THIS: the point splits the curve in two smaller curves, and it's coordinate would be the length of the first of the two smaller curves (the one that starts at start and ends at split point)
so, if you get that P coordinate, you can use sin(P) and cos(P) to get Y and Z respectively (i think?) BUT
these Y and Z coordinates will be in a local coordinate system that is centered on the point and has it's X axis tangential to the curve in that point
the X will be the P coordinate
lets call them Xloc, Yloc and Zloc (loc for local)
so you have
Xloc = P
Yloc = sin(P)
Zloc = cos(P)
now you have to convert the Xloc Yloc Zloc coordinates from local system to the global one which is REALLY **** COMPLICATED and i LITERALLY had this on my linear algebra exam 24 days ago (but with 2D coords only) and i still have NO IDEA how to do it
i might post something tomorrow, thats all that i can think of today because its 5AM and im going to go sleep right after posting this
Offline
forwarded this to a friend, he replied with this:
~~~
You will need to add a path to the scene.
https://cdn.discordapp.com/attachments/ … nknown.png
Then you need to select your object you want to spiral on. Add a "curve" modifier. And set it to the path you added to the blender area thingy.
https://cdn.discordapp.com/attachments/ … nknown.png~~~
i have no idea what any of this means lol
your friend is wise
that's what I had for the example, but in my case I can't rely on it. The end goal here is to wrap curves around curves around curves. You don't seem to be able to "nest" curve modifiers like that unfortunately which is why I'm essentially trying to re-create the curve modifier in math.
"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto
Offline
Curves have been wrapped around curves that are wrapped around curves
I basically did Maxi's thing but I cheated because I found a function called "Rotate Vector" that did all the brain-killing math of rotating a vector then I was able to just add the position of the curve to the position of the spiral and tada curves wrapped around curves wrapped around curves.
"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto
Offline
what are you even doing with this
Offline
Offline
[ Started around 1739347502.6481 - Generated in 0.321 seconds, 12 queries executed - Memory usage: 1.49 MiB (Peak: 1.64 MiB) ]