Official Everybody Edits Forums

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.

#1 2018-01-22 03:20:34, last edited by Different55 (2018-01-22 23:38:09)

Different55
Forum Admin
Joined: 2015-02-07
Posts: 16,572

how do I rotate a point around another point in 3D space

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)

tada spiral

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

#2 2018-01-22 03:47:06

Ratburntro44
Member
Joined: 1970-01-01
Posts: 1,382
Website

Re: how do I rotate a point around another point in 3D space

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

#3 2018-01-22 03:51:03

Guest.
Guest

Re: how do I rotate a point around another point in 3D space

forwarded this to a friend, he replied with this:

~~~

You will need to add a path to the scene.
unknown.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.
unknown.png

~~~

i have no idea what any of this means lol

#4 2018-01-22 03:57:45

TaskManager
Formerly maxi123
From: i really should update this
Joined: 2015-03-01
Posts: 9,457

Re: how do I rotate a point around another point in 3D space

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


i8SwC8p.png
signature by HG, profile picture by bluecloud, thank!!
previous signature by drstereos

Offline

#5 2018-01-22 04:51:16

Different55
Forum Admin
Joined: 2015-02-07
Posts: 16,572

Re: how do I rotate a point around another point in 3D space

zyhrllos wrote:

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

#6 2018-01-22 16:55:42

Different55
Forum Admin
Joined: 2015-02-07
Posts: 16,572

Re: how do I rotate a point around another point in 3D space

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

#7 2018-01-22 17:01:23

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,202

Re: how do I rotate a point around another point in 3D space

what are you even doing with this

Offline

#8 2018-01-22 17:12:42

Different55
Forum Admin
Joined: 2015-02-07
Posts: 16,572

Re: how do I rotate a point around another point in 3D space

ART

curves wrapped around curves are just the beginning

no but I want to figure out how to do this because this looks cool.


"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto

Offline

Wooted by:
Different551516637562693512

Board footer

Powered by FluxBB

[ Started around 1711623190.8884 - Generated in 0.068 seconds, 12 queries executed - Memory usage: 1.48 MiB (Peak: 1.64 MiB) ]