Grasshopper

algorithmic modeling for Rhino

How to control specific points on the Sine Curve?

Hello Everyone, I m new in GH and dont know how to control the Sine curve like I want it to be. Is it possible if keeping the shape of the roof but only pull down 2 points (maybe its nearby points as well) of the curve down so it can touch 2 corners at the back of the room?

My concept is to match the coordinate of 2 corners at the back of the house which is

(x0, y1183, z570) and (x1187, y1183, z570) and extract 2 closest coordinate of the roof... and change its Z value?

I noticed there is a pull point command but dont really know how to use. How can I extract the points on the curve and edit its Z value but keeping the general shape of the mushroom roof? Please Help..... m(_  _)m  and Thank you for reading this.

Views: 1954

Attachments:

Replies to This Discussion

Are the curves in Rhino or in Grasshopper only?

In Rhino, you could use the PointsOn command to turn on control points (or EditPtsOn for edit points) and then simply move the end control points down to the level you want.

If you want to do this in Grasshopper it's a little more involved.  You'll need to use something like the following sequence of components:

- Control Points (to get the control points of the curve)

- List Item (to get the start or end control point)

- Deconstruct (to get the coordinates of that point)

- Construct Point (to rebuild the point with the X and Y coordinates of the original, but the new Z coordinate you want to specify)

- Replace Items (to replace the original start/end point in the control points list with the one you just created)

- NurbsCurve (to rebuild the curve with the modified set of control points, plus the weights and knots of the original)

If the points you want to move are not the curve ends (it's a little hard to tell from the images above) then it's even more difficult since Grasshopper doesn't really have an Edit Point equivalent - probably your best bet is to Divide the curve, move down the relevant points and then use Interpolate to rebuild a curve through that modified set of points.

Thank you very much Paul. Helps me a lot! I will have a try on this

I looked at this too and noticed that the original curves are extremely "wiggly" with high frequency sine waves, but those curves are radically smoothed out using 'Rebuild'.  As Paul said, your best bet is to arrange your original input curves to touch the building where you want - and then you'll want to minimize the 'Rebuild' effect because it distorts the curves too much and they won't touch anymore.

Yeh Joseph.. I dont know why the original curves look so bad and it is very hard to control as well. is it coz of the formula that I used? let me try again. Thanks for your suggestion! 

Looking again now...  had to "turn the lights on", enable preview on early curves, disable the slow part ('SrfSplit')...  Then tried decreasing the 'Count' value from 77 to 22 (changed maximum from 1000 to 100).  I by-passed 'Rebuild (ReB)' but found that 'SDivide' after 'Loft' failed because 'Loft' had produced a Brep instead of a surface.  So I used 'Loft Options' to 'Rebuild' and got a surface again.

I'll stop at this point and give you what I have.  I think if you experiment with the point count and/or play with the 'Loft option' rebuild count and 'Z' values for the 'IntCrvs', and perhaps rotate the resulting surface to align with your anchor points, you can make this work.  Enable 'SrfSplit' only AFTER you get the surface aligned as you want it.

Attachments:

P.S.  Meant to leave 'SrfSplit' disabled; this version shows the surface and projected curves for splitting it, which is all you need while experimenting with parameters to affect the shape.

P.P.S.  I suspect you might find better shape control if you reduced the maximum value of those 'y' and 'z' sliders feeding the 'Expression' components, and make them reals instead of integers.

Attachments:

I reduced the range of the two 'Variable z' sliders, made all four real instead of integers; reduced 'Count', and found the "Part of the Taiwan House" so located it for reference:

Attachments:

I realized later that 'Rebuild' was also feeding the outer edge pipe, which got out of sync when I used 'Loft Options' rebuild instead.  So I modified this pink group to use the outer edge of the lofted surface for that 'Pipe'.  Other small changes...  The reduced range controls are much better tools for shaping the surface, eh?  Cool roof, by the way.

Oops, forgot to disable 'SrfSplit' again.  Too slow to use with it enabled.

Attachments:

Really appreciated for your help and corrected my scripts :)

I have successfully generate a new curve and pull down a 'control point'... as shown here. Thanks to you and Paul. 

Noticed there is a weird part of the curve at the back of the house as shown (I didn't make any changes to it previously) but seems like another 2 control points that are far away from the curve but creating an intersection? How can I fix them and make it a smooth curve?

Attachments:

My efforts were intended to give you more precise control of the shape by fine tuning the curves and loft rebuild params.  Adding rotation to align the "corners" is another easy step.

Moving control points to alter that shape is a whole different game.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service