Grasshopper

algorithmic modeling for Rhino

Is there a components or a specific sequence of components that will let me calculate where 2 points meet at a specific angle. Like the opposite of a protractor, where u would start at a base point and then send a line along 0 and another along say 47 degrees. instead your starting i guess at the 2 points of an angles end that represent 0 degrees and 47 degrees and finding the start point of the angle you want? I know its probably a trig function, not so good at trig. Thanks.

Views: 2440

Replies to This Discussion

okay this is worded badly im going to sketch real quickly and upload the sketch

 

Ok so, what I want to be able to do is this, in the sketch say the black bar is a wall and the red rectangle is a corridor. I want to tell grasshopper that the corridor is a boundary and to tell me where point 1 and point 2 (each end of the wall) intersect at a certain degree within the corridor boundary. Basically I need to tell GH 2 points, a boundary and an angle an I want to recieve as a result the "start point" of that angle only within the boundary. Any ideas?
Attachments:
Instead make the boundary a line parallel to the wall, so the result must be an evaluation point somewhere on the line. I realize even a small boundary has many results so it must be bound to one line.

You create lines starting at those points, then use the Line|Line intersector. Line|Line operates on the infinite line segments and it will actually find the crossing parameter, which IS the intersection on 2D but the place where they approach each other the closest in 3D.

 

The easiest ways to make these lines would be to make them parallel to X then rotate them through the correct angle, or use the Point Polar / Point Cylindrical components.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks, 2D is what I am looking for, Its a plan type problem. Also I'm not as interested in a closest point intersection as i am with the intersection only being on a line / rail that I determine. thanks, I will check out these components.

Here's a Galapagos solution but it may not be what you want if you're looking for the intersection to be along a specific line within the hallway.

 

Chris

Attachments:

Again with Galapagos but it's simpler when you lock to a rail.

 

Chris

Attachments:
This looks exactly what I need, unfortunately, I don't really understand Galapagos, Ive never used it. Guess I got some reading to do.

Galapagos Screencast for Hallway Angle

 

The link above will show you how to use the definition.

 

Chris

WOW, you are extremely helpful thank you for taking the time out to help. Much appreciated.

Geometric solution with restricting on a curve. Not fully tested.

Mmmh I am not quite sure what you wanted actually,  give one rail, one angle and 2 points as parameters, and get the points on the rail which have the given angle with the 2 parameters points ?

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service