Special request

Next
 From:  Samuel Zeller
6097.1 
Hi there,

I'm trying to do this (see screenshot) but automated for a client.

Basically filling a shape (here a snowflake) with different circles (with a minimum radius) with no intersecting circles and no overlapping on the text.



  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  futagoza (STEFAN)
6097.2 In reply to 6097.1 
Hi,

if you have Rhino (trial) you could google for a Circle Packing script, which might do what you are after.

Regards
Stefan
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Samuel Zeller
6097.3 In reply to 6097.2 
Thanks will try that later !

I hope it's possible to constrain the "pack" of circles inside shapes :)
--
shapenoid.com stojan-voumard.com
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
6097.4 In reply to 6097.3 
Here is a link to a description of an algorithm which seems promising:
http://cs.stackexchange.com/questions/12925/circle-packing-algorithm-used-by-percolator

To paraphrase:
Areas forbidden to circles would be masked out as black pixels.
For all white pixels, make a list of the distance from the white pixel to the nearest black pixel.
The list then contains the radius of the largest circle that could be placed at that pixel.
Process the list, (somehow), to add size constraints and some pseudo-randomization...
...write a MoI script...
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
6097.5 
Hi,

Filling a boundary with an object set would be amazing, there could be offset between adjustment.

Have you tried Colliderscribe in illustrator? It quite nice.

Also maybe a Mograph cloner with a collision tag in C4D? I don't know how it would work with spline though...

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
6097.6 
According to the thesis here: http://www.geometrie.tuwien.ac.at/hoebinger/mhoebinger_files/circlepackings.pdf

"As the combinatorial structure of a circle packing is equivalent to that of a triangular
mesh and those meshes are one of the most common forms of surface representation, the
idea of utilizing triangular meshes as a structural basis for circle packing approximation
is self-evident."

So how about creating a triangular mesh in MoI, of the snowflake. Leave the letters hollow?

Need a test file.

-Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
6097.7 In reply to 6097.6 
Here is a quick test file.

EDITED: 9 Aug 2013 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6097.8 In reply to 6097.1 
Hi Desudeus, I don't think it's feasible to create a script for that currently, because there is not any "collision detection" type mechanism for the script to use.

The difficult part of what you are describing is making each placed circle aware of all that content, you want the circles to avoid quite a lot of boundaries there, like not cross the snowflake, not cross a letter, and not cross another circle, that's an awful lot of collision detection needed...

I think you'll need to use one of the other solutions from other programs mentioned above.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  OSTexo
6097.9 
Hello,

There are some good options on the Grasshopper+Rhino forums at

http://www.grasshopper3d.com

The addition of Grasshopper to the process may give you some easier ways to set options and control output.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6097.10 
I guess from a programming point of view it would be better to set up a kind of marker of the "allowed region", like a bitmap with a white background with allowed areas marked in black. (probably by drawing triangles from a file prepared as Brian shows above). That would then simplify the collision detection part since it's easier to look at colored pixels than it is to do numerous curve intersections.

Then with that "allowed area" bitmap prepared the mechanism would go something like this:

Generate a random x,y coordinate within the bitmap for the center of a proposed circle. If the proposed center is not on an allowed area skip this one and try again.

Scan a square of pixels surrounding the center point keeping track of the closest non-allowed pixel that was found.

The circle radius then becomes some fraction (for padding) of that closest non-allowed pixel distance.

The circle is recorded, and then the bitmap is filled with white around the just placed circle so that it is off limits for the next placed ones.


Something along those lines anyway.. Unfortunately those steps need a lot of things like bitmap manipulation that are not set up currently for scripts to access easily. So you're talking about a pretty tremendously complex script that would do things like read a triangle OBJ file and render the triangles into a bitmap all with custom script code...


EDIT: Oops I missed Brian's first reply above, he mentions a similar thing as what I'm describing here.


- Michael

EDITED: 6 Aug 2013 by MICHAEL GIBSON

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
6097.11 In reply to 6097.1 
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All