Grasshopper

algorithmic modeling for Rhino

I'm trying to make this object that you can find on this link.

http://xahlee.info/surface/breather_p/breather_p.html

I attached my definition but for some reason the equation for "denom" is not working and I can't figure out why. Did I input something wrong?

Breather Surface

Views: 1560

Attachments:

Replies to This Discussion

Hi!

Use only curved brackets and remove all line breaks in your functions than the eval components should work.

You will have to evaluate your formulas with several parameters to get a surface.

Thanks!

I got the denom equation to work but I can't get the main one to work. I'm unsure of what you mean by "evaluate your formulas with several parameters to get a surface" Parameters means variables right?

I was just trying to copy how this guy did a moebius strip (definition attached). I figured it would work the same way with this equation.

I found this equation also

http://matematiku.wordpress.com/2011/05/18/parametric-breather-pseu...

But I'm not sure if this one is any better than the other.

Attachments:

In the final formula are still line breaks. If you have line breaks in your expression the Eval component fails. Remove them and use curly brackets to build a vector:

{-u + (2*r*Cosh(b*u)*Sinh(b*u))/denom, (2*w*Cosh(b*u)*(-(w*Cos(v)*Cos(w*v)) - Sin(v)*Sin(w*v)))/denom, (2*w*Cosh(b*u)*(-(w*Sin(v)*Cos(w*v)) + Cos(v)*Sin(w*v)))/denom}

Tip: Use the built-in editor (double click on the Eval component with no panel connected to F) to put in your formula and get more information about syntax errors.

With parameters I mean u and v (w and denom are helpers, b is constant for the whole surface). You have a function that maps 2d points (u, v) to 3d points (x, y, z). At the moment you are mapping only one point. You have to do that with multiple points to get a surface. If you look at your moebius example there are Range components connected to the u and v inputs instead of sliders.

Mathematically you would have to insert all points (u, v) that exists but in practice we can only use some of them.

More points make the surface more accurate but the calculation gets slower.

To get a smooth surface you can interpolate the resulting points with the SrfGrid component.

Cheers!

Attachments:

Thank you TJO! Wow it looks great! I had a few more questions if you don't mind.

-I see now that I was only making one point, so in this definition I made, I set up a domain and range. Why do you use holistic cross reference though?  Is it just a way to generate more points instead of bumping up the steps in the range?

-Also I see you used three different functions for the XYZ and put the "denom" spart int them. Why is that? What I have now in my attached definition should give the same result, right?

-Lastly there is a U-1 expression in the last component, what does that do?

I tried to follow along but mine looks uglier than yours, plus the definition is slower. So whatever you did differently is making a big difference and that's why I'm curious to know why did the things you did.

Thanks again! I'm learning a lot!

Attachments:

You're welcome!

You have connected the wrong slider to the SrfGrid component and the expression for this parameter is wrong. It has to be U+1 instead of U-1. The expression means that instead of taking U the component should take U+1. I removed the expression and replaced it with an Add component to make that clearer.

Cross reference is to get all combinations of u and v. Otherwise we would get only a diagonal line over the surface. Take a look at data matching in grasshopper. In earlier versions of grasshopper this functionality was integrated in the context menu (like in the möbius example). Now there are components for that.

A short example: If we have two lists u = {1, 2} and v = {3, 4} and we put them directly to the Eval component we will get the results for (1, 3), (2, 4). By adding the cross reference we will get the results for (1, 3), (1, 4), (2, 3), (2, 4).

You also use three formulas but you only use one Eval component. The formula you use is like "{formulaX, formulaY, formulaZ}" which directly returns a vector. I divided them to several components to make my definition clearer (shorter formulas). The formulas and the results are always the same.

I boosted my definition by making b constant and taking advantage of symmetry and periodicity. So I calculate only a part of the surface (orange) and use mirroring and rotating to build the rest:

That way i get also sharp corners at the transitions.

Greetings!

Attachments:

Thanks again! I'm so happy it's working now. I'm going to go off and try out some of the other mathematical surfaces as well.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service