Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5800

Fun Project: Method for Projecting Custom Objects onto Surface

$
0
0

@Dean_Goldman wrote:

Hi all,

I am working on a project where I need to cover a form with a set of objects. I am covering a 3d scan of a hand in 3d scans of fruit.

The parameters are such that the fruit must be packed as densely as possible, in random order and rotation, but not intersect with one another. Instead of placing each fruit with Gumball, can you propose any suggestions for automating this process?

What I have so far:
I slightly modified a script I found on Designalyze (a super great website) so that it would project identical spheres onto a surface without intersecting. I was thinking of continuing something along the lines of this basic structure.

In the test script I used the rhinoscriptsyntax method addSphere. One of my thoughts is to define a new method named addFruit. AddFruit would:

  • Pick a fruit from a list of fruit
  • Rotate it randomly on x,y, and z
  • Measure a radius based on where the object has oriented itself (A pineapple on it's side has a bigger radius than a pineapple standing straight up)
  • Use that radius in an equation that tells Rhino at what coordinates to put the fruit.
  • Check for collisions with other fruit, if the fruit collides, regenerate a new fruit

There are a few things that I have yet to find solutions for:
- Densely packing fruit on x,y, AND z axis. The script above binds spheres at their x and y axis, but they are not bound at the z axis.
- Make the radius measurement from the randomly rotated fruit's furthest boundary.
- Making a collision check system.

Perhaps there is a physics tool in Rhino that would treat fruit objects as solid and essentially "swarm" the hand surface? I have seen things like this in Maya's MASH plug-in.
Perhaps there is a good paneling method for this?
If anyone can suggest rhinoscriptsyntax methods, built-in tools, or general advice, I am interested to know.

If you have taken the time to read all of this and have any thoughts, I am thrilled to hear from you, and highly thankful of your interest. Cheers!

.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5800

Trending Articles


Practice Sheet of Right form of verbs for HSC Students


Sarah Samis, Emil Bove III


ZARIA CUMMINGS


Need radio code for IVECO Delphi Aptiv FJ5 RBT M16


Black Angus Grilled Artichokes


Ed Sheeran – Sapphire – Pre-Single [iTunes Plus M4A]


Sunny Garcia’s Ex-Wife Colleen McCullough


99 God Status for Whatsapp, Facebook


Funeral of Sir Warwick Franklin


MHDD