Closed nicholasprice closed 11 months ago
@nicholasprice This looks good. Just to confirm, if I changed only the startAngle smoothly over time, would this do rotation of a wedge around a central point? (it seems your rect is creating space for a full implied circle, rather than just the bounding box of the drawn arc?)
@dshimaoka I have a feeling these commits are getting pushed under my account.
How weird I still get notices??? Answering Adam's query, yes the trick is to set startAngle dynamically. A version of it is implemented here. By specifying a window for a full circle, we don't need to worry about the center of the rotation.
A minor performance observation on your demo script:
ptch.startAngle= '@contour.contDir * contour.shiftPerT*(rem(1/contour.fps*contour.frame, contour.dur))';
If part of that is a constant, I'd precompute it rather than calculate it every frame. e.g. maybe you are just adding a fixed offset each frame?
Also, I suspect you would want to stopLog() on the startAngle property to avoid huge file size and potentially frame drops? If so, you would need a separate parameter to log the starting angle at beginning of trial.
When you said you were getting frame drops with convPoly
version, potentially that was why?
Ah thanks for the suggestion, I am keen to learn how to achieve less dropped frames! Do you mind elaborating a bit more about how to do precomputing in this context, or point to a relevant demo code?
A new stimulus for drawing a framed of filled wedge. Useful for creating a rotational wedge. Less missed frames than an arc achieved through convpoly.