Hi there,
I’m working on an animation of a wave that requires a perpendicular plane component to create a sort of wavy triangle shape.
The problem is that the perpendicular frame mirrors as the angle of the curve at the analysed point changes (/as the wave animates)
It would be easier to understand per viewing the grasshopper file. I’ve annotated both the animating component and the perpendicular plane component.
I’ve tried to make this work extensively, but I can’t seem to figure out a work-around. Hopefully one of you will
Thanks in advance
sun waves.gh (33.0 KB)
Believe it or not, your code is not easy to understand.
On a hunch, I replaced the XZ Plane connected to Mirror with a YZ Plane and it looks pretty good?
sun waves_2024_Jul5a.gh (35.0 KB)
P.S. I realize that my “fix” is probably way too simple… But your code looks excessively complex to me, which makes it difficult to understand. And from what I can see, error-prone when trying different parameter values for ‘AMPLITUDE’ and ‘FREQUENCY’.
Unfortunately, your fix was not enough. The switch I’m mentioning is more obvious when activating the second surface, which is a sort of cross product of the first plus an additional wave, based on the ridges of the first.
I’m sorry for the illegibelity of my code. I’m still learning and I’m kind of autodidactic, so my code might be somewhat unorthodox. If you have any questions however, I can explain.
Here’s an example of the second wave shape I mentioned:
2nd component
I’m not going to look at it again. It’s your job, not mine, to ask clear, unambiguous questions.
I’m sorry if my question wasn’t clear. You only told me the code wasn’t easy to understand, so I just told you I don’t mind clarifying things if you need me to. I also don’t mind clarifying my question, but I’m unsure how to phrase it more clear than I already have.
That being said, it’s not your job to help me at all. So do whatever you please
I fixed it by replacing the perpendicular frame component with an evaluate curve component and rotating the resulting tangents by 90 degrees.
So you are the only one who learned anything? Consider posting the solution, eh?
By the way, the moral of the video (“Does your dog bite?”) is: When you ask the wrong question, you get the wrong answer.
I’m sorry, I don’t understand what you mean by that first sentence. I’m not very comfortable with this forum yet, I’m just trying to do what is correct.
I think we got off the wrong foot a bit. I had a pretty serious operation the day before yesterday and am currently experiencing side-effects of pain-killers and the anaesthetics of the operation. I decided to do some coding because it distracts me well. Rereading my initial post I can see how I was vague, but that wasn’t my intention.
I can rewrite the solution when my head is more clear, but I feel like I should probably rewrite the whole initial post or no-one will be the better of it.
Sorry if I came off wrong or offensive. I don’t mean to.
You can not (i.e. should not) use the Plane Normal component if you care about the plane orientation. Given a single origin point and a single normal vector, there’s an infinite number of planes that satisfy those constraints. Because you can rotate the plane around its Z axis through any angle without violating the constraint conditions.
The way Rhino picks the orientation of the perpendicular plane it computes is by first finding the largest component of the normal vector (x, y or z), and then cooking up perpendiculars based upon that. This means that when the normal vector changes from before (even a little bit) it’s possible that a different component is now bigger, thus resulting in a different orientation.
One possible solution is to post-process your planes with the Align Plane component. Another is to generate them using a fully constrained method, as outlined elsewhere in this discussion.
I wish you a good recovery.
1 Like