algorithmic modeling for Rhino
Hi Daniel,
are you talking about storing data in a matrix, about transformation matrices or about the new matrix data type?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I think I forgot about this discussion. Sorry. I am not familiar with Octane (other than knowing it exists).
I deduce from you mentioning "management of instance[s]" that you are talking about transformation matrices. I.e. 4x4 matrices that encode translation, rotation (including partial rotation aka shearing), scaling and tapering.
If you are asking how to create a transformation matrix given two instances of an object, I think your best bet is to use the ChangeBasis method the RhinoCommon Transform type. It allows you to construct a transformation matrix that maps from one base-plane to another. In the process encoding both translation, rotation and even scaling. It does require you have a method of constructing a consistent base-plane given the shape. I wrote a small script that creates a Brep frame consistently from the brep vertices (see attached).
--
David Rutten
david@mcneel.com
Poprad, Slovakia
ps, my script does not do scaling. Haven't tried adding that. If you have further questions, please post them here if at all possible, that way I won't have to answer the same question twice were it to come up again in the future.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
The coordinates in a scatter node are given as the first three rows of the transformation matrices (the fourth is always [0, 0, 0, 1]).
Yes, the fourth column of the fourth row is always 1.0. The first three numbers in the fourth row however represent a tapering transformation. This is mostly used in perspective deformations, so it's understandable that it would not be used for instancing objects in 3D space.
Creating a 'scatter node' from a Rhino transform matrix is a piece of cake, at least in code. The only remaining question is: "what data type is the scatter node?". Is it a single piece of text with numbers and spaces (numbers formatted using the local culture or do they always use points as decimal symbols?). Is it an array of single or double precision floating point values? Is it a byte-stream with encoded floats?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Yes, I need to know in what format to supply the data so that it can be used by the other software in this dance. I updated the file to include a matrix -> string formatter.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by