[MeasureMoonPhaseCompletion]
; percentage from full moon (0.0) to full moon (1.0)
Measure=Calc
; Uncomment this formula for demo mode
;Formula=([MeasureLoop]/300)
; Comment this formula for demo mode
Formula=(([MeasureTime:]-#MoonCycleOffset#)/#MoonCycleLengthInSeconds#)%1
DynamicVariables=1
; If waning, right side bright; otherwise, right side dark
IfCondition=([MeasureMoonPhaseCompletion] < 0.5)
IfTrueAction=[!SetVariable RightColor #DarkColor#][!SetVariable LeftColor #BrightColor#]
IfFalseAction=[!SetVariable RightColor #BrightColor#][!SetVariable LeftColor #DarkColor#]
; If crescent (25%-75%), middle section is dark; otherwise (gibbous) middle section is light
IfCondition2=(0.25 < [MeasureMoonPhaseCompletion]) && ([MeasureMoonPhaseCompletion] < 0.75)
IfTrueAction2=[!SetVariable MiddleColor #DarkColor#]
IfFalseAction2=[!SetVariable MiddleColor #BrightColor#]
; Optimization to get down to two shapes drawn: join the middle with the correct side of the moon
IfCondition3=([MeasureMoonPhaseCompletion] <= 0.25) || ((0.5 <= [MeasureMoonPhaseCompletion]) && ([MeasureMoonPhaseCompletion] < 0.75))
IfTrueAction3=[!SetVariable ShapeToUnionWith Shape4]
IfFalseAction3=[!SetVariable ShapeToUnionWith Shape5]
After doing that, the demo matched your posted image!
Any chance we'll see something like a Quadratic Bezier that allows for n sets of pairs? I understand that the path allows us to do something similar, but there are still a lot of jagged connections between sets of CurveTos (even with StrokeWidth increased, and StrokeLineJoin Round.
Aethrios wrote:Any chance we'll see something like a Quadratic Bezier that allows for n sets of pairs? I understand that the path allows us to do something similar, but there are still a lot of jagged connections between sets of CurveTos (even with StrokeWidth increased, and StrokeLineJoin Round.
I resist the description as "jagged connections", as I don't think that is possible. If you have an example with an image and code, I'd be interested to see it.
I think what you might be describing is the fact that the "end point" of a CurveTo segment is not a "control point", but a fixed end point. Then the next CurveTo segment starts at the end point of the first. So you can get some rather "abrupt" changes of direction with two CurveTo segments. This can create more of an "angle" between the end of the first and the start of the second, rather than a smooth seamless curve. While this can be addressed by using more CurveTo segments to "smooth out" the change of direction, there may be something we can look at to do some kind of "spline" segment that might simplify this.
So like you described, the sharper connection between the two curves is what I'm looking to eliminate. Approaching this from a mathematical perspective, I believe what I'm trying to describe would be a polynomial regression, with the ability to specify more points than are allowed in the quadratic bezier. Ultimately, what brought me to ask about this is trying to put together an audiolevel-dependant polynomial regression, which I don't think is possible at this point (hence why I'm not including a mess of code that doesn't actually produce anything that looks pretty!).
And please don't get me wrong, that I even get the time of day is great; I don't expect anything just because I'm curious on the forums!
You do not have the required permissions to view the files attached to this post.
Aethrios wrote:Any chance we'll see something like a Quadratic Bezier that allows for n sets of pairs? I understand that the path allows us to do something similar, but there are still a lot of jagged connections between sets of CurveTos (even with StrokeWidth increased, and StrokeLineJoin Round.
I had a similar thought when I was learning about the curve shape and ended up using 12 Bezier curve shapes driven by 24 alternating audio measures. Matching the start/end points and control points for each shape determine how jagged the transition from one curve to the next will be, and some sort of 'spline' may help.
Man, that's a great skin you put together, nicely done. Totally beat me to the punch, that's awfully close to what I was trying to pull off. I'll try overlapping beziers, it was on my list of ideas but I was running into some issues with defining a filled shape, though I'm sure it'll smooth out with some polish. Thanks for sharing!