Rotate 3d object on a single plane with attractor point

hello everyone, I have a dome with spines on it, how can I rotate these spines around themselves so that the tip of the spine is facing towards the attractor point (the spines are bent)
in other words, I am trying to unify the orientation of the spines and to have a controllable attractor point as well would be optimal

I tried establishing the shortest distance from a vertex at the spine tip towards the attractor point, but I didn’t know how to reflect this condition onto a rotation component

to clarify, here is a close up to one of the spines

I hope I don’t need galapagos for this.
pufferfish spine.3dm (318.9 KB)

Bend Deform is surely what you are looking for

1 Like

thank you for the answer, but I’m afraid I need to keep the spines all identical in shape without deforming them, it seems I might have to rotate them all manually one by one

Upload the code with the dome etc.

construct a plane on each face of the dome (with the center in the center of rotation of the spine), then project your attractor point on each plane.
With the attractor and the spine referred to the plane you can play and get the angle of rotation needed

What are you expecting to happen on areas like this? If you’re just rotating the spike will go through the dome. Or must those spikes rotate less so they only slightly face the attractor?

the plane of rotation is centered on the base of the spine and should be tangent to the surface.
maybe try uploading the gh file

Maybe you can work with this as a starting point.

orient.gh (15.1 KB)

1 Like

just saw that i uploaded the rhino file instead by mistake, i will upload the grasshopper now, thanks for the heads up and sorry for the inconvenience

puffer spines.gh (55.1 KB)

this is exactly what I am looking for.

puffer spines measure’s help.gh (56.2 KB)
EDIT: scaled up the dome and spines to see the tangential planes more clearly

So I did this, but my work is a mess, I think the problem might be with my original dome mesh,

why are the spines offset out, and I couldn’t understand in which component do we decide the direction of the target plane, I know that there is an X-Y source plane, but what determines its direction (east,west,north,south)?

puffer spines.gh (51.0 KB)
here is how I’d do it. As you can see the reference planes are oriented in a way wich ther local X axis points the attractor. you need to set the correct rotation in the global XY of your initial object, then all the final objects will be correct

Thank you,
one final thing, I have attempted to move the spines back to their corresponding mesh facet centroids since they seem to have shifted away along the dome surface

I have achieved this by moving the spines from a vertex on their body towards the centroids, however my question is, for accuracy sake, what way would you recommend to easily select “that vertex on the spine’s body” without having to use List Item and sorting among 1050 vertices indices with a number slider? is there a way that you lets you visually choose the correct vertex by simply clicking on it?

puffer spines Fabio.gh (57.0 KB)

I would recommend moving your initial spine so that the desired anchor vertex is located at the origin (possibly also changing the orientation to align with the x-axis). Then your transformations can just default from the world x-y plane.

Alternatively, you could define a plane at the correct point of your initial spine and calculate the transformations from that.

3 Likes