Jump to content

Randomize script/lisp


Ras
 Share

Recommended Posts

Hi

 

I need to fill an object with a fully random pattern of rectangles. I would like to be able to perform this action with other shapes too. I am not looking for standard hatching (i think) because I want to avoid tiling patterns. What I am looking for is something like the scatter funnction in 3ds MAX.

 

If you know of a script or a likely place to find one I´d be very gratefull.

 

Thanks in advance.

Link to comment
Share on other sites

Ras:

 

I know you said you probably didn't want a hatch, but there is a lisp routine at http://www.cadalyst.com in the 'Get the Code' section with a Custom Hatch Pattern Generator by Masuo Nakajima. You should be able to find it if you search the code for 'pattern'. Alternatively, if that isn't random enough, then you might be able to contact Watson Kilbourne the king of hatches to write an autolisp routine or other code that incorporates a truely random pattern.

 

If you know the format of a dxf file you might be able to bang out some simple basic code that would do what you want. All of this is assuming that you're working in 2D. Some of the other experts here would know more about a 3D application.

 

Good luck and let me know how you make out with the problem.

 

Mike White

Link to comment
Share on other sites

Hi Mike

 

Thanks for the tip. I tried the lisp routine you suggested but it isn´t exactly what I´m looking for.

 

Take a look at the thumb I uploaded. I am trying to produce random tiling patterns for a large square without having to design the randomnes myself.

 

This one was produced by exporting my boundery to 3ds MAX, drawing a rectangle, converting both objects to polymeshes, and using the compound/scatter function to randomly distribute copies with random x and y scaling within the boundery mesh. Everything was done in 2D but works equally well with 3D objects. (thumb 2).

 

This proces worked well enough but it takes too long and it seems that there should be nothing in the way of making something equivelant in ACAD.

I´m not much of a programmer myself and working up against a rapidly aproaching deadline so I haven´t really got the option of producing anything myself right now but if there isn´t already something like this out there I´m sure I´ll be coming back to it.

 

Thank you for your response Mike.

Link to comment
Share on other sites

HI Ras:

 

Looks interesting. Not being up on alot of the neat functions in 3Ds, I cannot think of anything at all other than developing some type of code which would be out of my expertise. The only other 'out of the box' solution that could think of is City Gen which creates randomly placed cubes (or buildings) on a 2D plane. It is probably going to be to ordered though for your uses. There are some links at the SketchUp forum if you are interested but again I think it is not what you really need. Your result is VERY random at many levels.

 

Good luck

 

Mike White

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...