Grasshopper

algorithmic modeling for Rhino

object can travel and turn its direction along the curve

hi all 

i would like to create the object that can travel and along the curve. 

but the curve has a couple of direction. 

the object can travel along the curve and trun the direction according to the vector of curve. 

what should i do?

thanks!

Views: 926

Attachments:

Replies to This Discussion

Read the manual!  Watch some tutorial videos.  Do your homework.  Experiment.

Sorry, some of your questions sound like you haven't even tried yet to do it yourself.

i have finished a part of component....
i can move  the object along a curve but i cannot turn the direction

so my question is how to turn the direation of object along a curve.

i tried to do that for a long time ...

but i cannot finish.

i tried to find the tutorial and website. its no any relative information about turn the object direction along the curve

Try [orient] instead of [move].

THANKS FOR YOUR REPLY FIRST

HOW TO CONNECT THE ORIENT

Thanks for the reminder (again!) about 'Reparameterize' - it makes life SO MUCH EASIER!!  I must retrain myself to use it.  Mahalo.

Attachments:

Two methods in this code:

  • slide box along curve using 'Point on Curve' slider (first group)
  • divide curve (second group)

Note the use of internalized data in the GH file - eliminates the need for the Rhino file.

Attachments:

By the way, Joyce, as you orient/sweep/flow geometry along a curve, you will soon discover "torsion", if you haven't already.

The curve in this example is created with four control points:

  1. the origin
  2. a point along the Y axis
  3. arbitrary X, Y and Z coordinates
  4. same Y and Z as #3, moved to a higher value of X

The result is a curve who's tangent at the beginning is the Y-axis, and at the end, is parallel to the X-axis.

I added some switching to my previous code to choose an original orientation (circled in blue in the animation) between:

  • "Curve End" - as before, origin (pA) and tangent (dA) for the box are obtained from the curve start - or...
  • "World" - ignores curve, uses World origin for 'pA' and either X, Y or Z unit vectors instead of curve tangent for 'dA'.

NOTE: The X/Y/Z value list is ignored using "Curve End" - works only using "World".

Notice that "World | X" keeps the boxes level and that "Curve End" and "World | Y" have the same torsion, due to the nature of this particular curve (described above).

Aloha

Attachments:

Oops!  I forgot to use "Internalize Data" on my curve; didn't notice until after I mirrored it.  Same idea, twice as long - attached.

Attachments:

Animated .gif made with GH 'Animate' slider dialog, combined exported images to .gif in Photoshop ('File | Scripts | Load Files into Stack'), animate frames from layers.

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