Grasshopper

algorithmic modeling for Rhino

Hello,

I have a cube made up of 6 sides populated by pop2d points. In the center i have sphere which i would like to morph using the unique position of the points generated by the pop2d command. Im guessing i would use the location on the surface and its distance to every edge and project this behavior on the center point in some way, yet i dont know how, or if this is even appropriate.

I would be tremendously thankfull if you could help me out,

Best,

Leo

P.s. In rhino i would've used the cage edit command, but i want to keep it parametric and in touch with the generated points!

Views: 2222

Attachments:

Replies to This Discussion

It would be tremendously helpful if you posted code with your question instead of just a screen shot.

I still don't really know what your question is about morphing?

HI Joseph,

I know this post has been a while ago, but I am wondering if there the points could be controlled and less random? 

I work out some points while when water vibrates when sound passes through. I like to know if there is a way to set multiple points that I need on the sphere and morph it?

Thanks

Morph like this?

Which is actually six copies of this - all identical since the seed value is the same for all six surfaces using 'Pop2D':

If you flatten the SrfClosest point input in Joseph's code you get this !!!.. well after all most a minute of computing and with only 60 unique points..   This is not played with Spatial Deform (Custom) in a while.  

Hey,

That is pretty much exactly what im trying to achieve, but in the opposite direction and less "spikey".. The sphere in the center should be more of a blob with indents, than a pufferfish ;)

Yet for some reason, when i copy the code and adjust it to my suit my project i get this:

(With flattend input)

(Without flatten input)

When i just plainly copy the code i get this - which i now see is exactly what i want, but instead of having the blobs on the surfaces of the cube, i want ONE which is in the center and reacts to the vectors which shoot towards it:

Other than that the shape is also very unclean, and should be a closed object, so i can 3d print it..

Thanks in advance,

Leo

Flatten the output from the Pop2D component instead of the input on the SrfCp Components. I expect the reason for the stray spikes is the vector has pushed the point though the surface and out the otherside. A couple of ways to resolve this is to put a divide between the 2pt vector output and the Input on the Deform component. If this does not work or you want more control you can check is a line draw from the point long the vector intersects and if so either trim or remove this vector/line. 

More like this potato shape?

Or you can replace 'VLen' with 'Unitize Vector(Unit)' to get a less cubical shape:

The changes I made were:

  • Flatten the output of 'Pop2D' to get one result instead of six.
  • reverse the inputs to 'Vec2Pt' so the vectors point inward instead of outward.
  • manipulate the amplitude of the resulting vectors.

You can get a rounder shape by adjusting the sphere radius up to 0.9, closer to the size of the cube.

Instead of using the surrounding cube you could 'PopGeo' the surface of the sphere and assign random lengths to the surface normals at each point.

There is absolutely NO WAY I will take the time to decipher your screen shots, sorry.  If you had uploaded code in the first place, I would have included my code with my replies so you wouldn't have to waste time with mistakes as you re-wire it.

As to getting a "Closed Brep" from this, good luck.  Even a sphere isn't a closed brep.

Hey,

Thank you for helping me out so much! I tried to incorporate the potato shape with my final project, yet for some reason i keep getting the puffer fish shape.

My project is based on taking a cube with the dimensions of 20cmx20cmx20cm and populating the surfaces with pop2d points, which behave towards the diameter of circles i put on the center points of a grid i covered the cube in. These different sized circles extrude toward the center of the cube, just to meet with the "potato" shape in the center which also behaves to the pop2d "attractor" points.

Here, my script:

An image of the center points of the grid and the circles which form around them:

This script was repeated 6 times for each side of the cube.

My Result:

My center is built using the pop2d command which derives from the cube's surfaces. Here you can see the problem that im having - my "spikes" are moving the wrong direction. Im sure the answere is quite simple, but i cant find a solution.

If you have any questions, ill try to respond asap..
Again, thank you for you help!

Leo

I have no questions and believe I already answered yours.  Reversing vectors is VERY EASY!

Have fun.  Next time, post your GH code along with screen shots - as I said in my first reply.  

Oh i'm sorry.. i thought you wanted screenshots.. didnt think of the gh file. My apologies.

As for reversing the vector direction, i have reversed inputs and outputs, ive switched the inputs for the vector2pt command, and ive tried to multiply inputs and outputs by -1.. but nothing is giving me the results i want. A google search wont give me anything to go on either.

I would be very thankful if you would help me, regardless of the my faux pas. Ill attach my gh file aswell, yet as for my rhino file - it is too large to post in the forum, so if you decide to take another look, you would have to send me your email address.

Leo

Attachments:

No, sorry, I'm done with this one.  Had my fun and moved on.  ALWAYS supply GH code and you'll have better luck getting help.  Use "Internalize data" for the parameters you get from Rhino so you don't need the whole Rhino file.  Standard stuff... as explained here: Read this first! How to get help on this forum

reversing the inputs reverses the order of the list.

to reverse a vector right click on the vector output and select expression then enter X*-1

Also, to save all this trouble with GH and 3d printing you could always buy a potato and carve little holes in it?

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