Date: Sun, 3 Jul 2022 14:26:53 -0700
From: Bret Victor
Subject: Re: July demo
The goniometer is 132 cylinders.  I was initially trying to draw it as 132 paths, each with their own geometry, and the framerate was over a minute per frame.

After looking at your example, I switched to 132 paths, each using the same geometry, and that's 11 fps. 

The actual cylinders are different lengths though, so (assuming I can't stretch a geometry?), the actual model is 132 paths, each using one of two geometries, and that's 8 fps.

(All of the points in a single path is 60 fps.)

I'm not sure how much of the problem is in the rendering and how much is just Realtalk being slow with many statements.  (e.g. Shawn's coarse-grained model is very slow because (at least) it's making thousands of wishes.)  Given that the single path is so fast, I speculate that if there were a "multi-path" geometry (or "multi-sphere") geometry, where you could specify all 100s or 1000s of cylinders or sphere in a single wish, it could do the trick.




On Jul 3, 2022, at 8:33 AM, Luke Iannini wrote:

Sooo coool!!! There's so much packed into every 10 second chunk, the "holy shits per second" have transitioned from a rhythm to an audible frequency.

If the goniometer model is 78 cylinders total we seem to be able to handle that OK as is, here's ~100 running very smoothly... I can make it creak if I make each page create 100 cylinder instances each instead but I can extend the "many" style to paths to amp that up considerably. Once I add the transforms mentioned last night to the many-spheres today we should be able to fling around massive particle models with ease as well!
<IMG_8944.mov>
with the following on each page:
-- Cylinders above me

Wish "cylinder" is a "path" geometry with points {
{x=-10,y=0,z=0}, {x=10,y=0,z=0}
} color {r=1,g=0.5,b=1} radius (0.5).

for i=0,10 do
local cylinder = create_id(you,"cylinder-"..i)
Wish (you) includes (cylinder) with geometry "cylinder"
position {x=0,y=-10-i*2,z=0} rotation {axis="y", angle=0}.
end

When (you) has region /r/ on /s/,
/s/ has width /w/, /s/ has height /h/,
/s/ has scene /scene/:
local c = region_centroid(r)
local angle = quad_angle(r)
local p = project_position_to_scene({}, c.x, c.y, w, h, -100)
Wish (scene) includes (you) with
position (p) rotation {axis="z", angle=angle}.
End


On Jul 3, 2022, at 1:26 AM, Bret Victor wrote:

The 3D paths that we're using for the proteins are looking beautiful, btw!

So glad to hear it!! I find myself always keeping a few proteins on the table just to spruce up the place lately.



On Jul 2, 2022, at 10:22 PM, Bret Victor wrote:

The protein segment of the demo is pretty much done.  Here's what it looks like!


Next, I'll be finishing up the origami block decoding and cryo-EM simulation, and then onto the protocol.  

The biggest unknowns right now are how robust the block recognition will be, and whether we'll be able to render the coarse-grained origami model (or even just a cylinder model) with acceptable performance.

I also still don't have any idea how one advances to the next step of a protocol.