Grasshopper

algorithmic modeling for Rhino

Move points on a rectangle according to a fixed given point.

Hey guys,

I have this probably pretty simple problem I got stuck in. The idea is I have a rectangle (or any geometry for the matter) and I need to move one of the corners inside as it gets closer to a given point (sort of an attractor I'm guessing). So, when the "rectangle" is above this given point the corner should be at a certain distance than it is when the rectangle is at, let's say 10 meters away which should be the initial state of the rectangle.

I tried using a vector method but I can't seem to figure a way to finely control the distance and I'm getting something but I would always need to mirror the end result.

I've also attached a sketch that is probably a lot more clear :).

Any nudge in the right direction is highly appreciated, I'm just searching for a more clever idea to implement this correctly :) And I hope I was clear enough.

Thank you for your time!

Views: 627

Attachments:

Replies to This Discussion

I don't have GH on this machine but from looking at your Sketch, I think you want to use the Remap Component,

This will allow you to remap the D1 from a distance between A and B to a number to input into a amp component to move the pts at the base from B to C. Within given domains as wanted so when the distance is 10 the pts don't move.

Hope that makes some sense, sorry i can't post up and images or code.

Hey Matt,

Thanks a lot, that worked like a charm! :D

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service