Megacopy technology for paths is now available. A Lua example is available at
39279 and the C API for constructing speedy packed buffers is also available.
For paths, we use full-blown 4x4 matrix transforms to allow rotations, as well as non-uniform scales and wacky shears should you so desire (whereas spheres use the fact that they look the same in all rotations to just use a vec4 instead).
Scene Kit provides the Lua function "create_transform" which is what's used behind the scenes to move objects around, so you can use that for a nice API for constructing per-path transforms in Lua as demonstrated in the example, or you can use the mat4 functions in "Linear Algebra: mat4" if you are assembling Allocated mat4* buffers directly in C.
Paths get two options for colors: if you don't pass a colors option when requesting copies, you'll get the sweet gradient colors that your path geometry object specifies on all your paths. If you do pass colors, they will override the path-gradient so you can choose a (single) color per path copy.
<IMG_8948.jpeg>On Jul 4, 2022, at 4:35 PM, Bret Victor wrote:
Looking great! My page for generating the linear dots is "Test origami blocks" (39276).
To test whether your dots are being detected, it's probably easiest to phantom my Biomolecule Kit (39058), and then make two pages:
Claim (you) is a "DNA origami board".
and
Claim (you) is a "routing view".
Putting a block on the "DNA origami board" should make things show up in the view.
On Jul 4, 2022, at 11:53 AM, Shawn Douglas wrote:
Here's the latest in Paper DNA block generation:
[Paper DNA blocks IrZ3Gt31mno.webm]
In case you'd like to play with the 3D models:
39266 -- DNA block gsds (as printed grid)
39256 -- Import gsd
39264 -- Render gsd CG
39267 -- Paper DNA block
39055 -- Show file banners (optional)
Bret, what is the page number for generating the linear dot patterns from your video?
I'd like to try porting that to make sure I'm generating everything consistently.
Thanks,
Shawn