Quantcast

staggered arrangement Syntax for cylinders

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

staggered arrangement Syntax for cylinders

Hang Luong
This post has NOT been accepted by the mailing list yet.
Hello,
I have question need your help.
I am programming for 3D-printer the model of cylinders on the plane. However, I don’t know the syntax of staggered arrangement for cylinders that as in the following attached image.
For example, if I want cylinders arranged randomly, I can use: rands or rand syntax, but I don’t know how to use it for staggered arrangement as in picture.
Could you help me in that?


Stay humble, Work hard & Be kind!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: staggered arrangement Syntax for cylinders

Parkinbot
You create your staggered arrangement in some double loop and decide randomly for each position, whether you put a cylinder or not. This directly translates into code.
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: staggered arrangement Syntax for cylinders

tp3
One way doing that staggered arrangement of cylinders...

linear_extrude(40)
    for (x = [0 : 9], y = [0 : 9])
        if ((x + y) % 2 == 0)
            translate(10 * [x, y])
                circle(3);



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Loading...