rl ·
Here is an example of implementing gradient fill using synthmaker primitives (based on the V-Loop)
Schematic
(edit: added optimizations and arc fill example)
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
rl ·
Here is an example of implementing gradient fill using synthmaker primitives (based on the V-Loop)
Schematic
(edit: added optimizations and arc fill example)
Tom7777 ·
Thanks rl 🙂
Edit - Just noticed you have put an extra r in Area, of course i did have to try going into that module with V connected, i see why you give the warning 🙂 Another thing not to do is to try and add one of the rectangles to your toolbox, i get a crash every time i try it. 😀
Shifrin ·
That's purty 😉
Shif.
oddson ·
Very cool 🙂
rl wrote: ...There ist a quirk: when entering the schematic that contains the V-Loop, Syntmaker needs very long time for looping at any redraw which makes it almost impossible to edit the schematic.
The slowness seems to be from the integers (that feed the I2C) updating and displaying. I took them out and the slowdown disappeared.
sambean ·
Wowee..
Very nice indeed..
Have been working on a paint module for a bit, never considered anything like this, brilliant..
Sam
Tom7777 ·
The slowness seems to be from the integers (that feed the I2C) updating and displaying. I took them out and the slowdown disappeared.
It will also allow you to save the module to your toolbox without crashing if you make this modification, thanks, devs maybe this is something to fix or optimize a bit.
oddson ·
I've been playing to learn from this. Thanks for the lesson.😀
I tied the step size and area width together to try drawing rectangles other than 1 px wide. Interesting 'bug-like' result. It leaves a visual gap between rectangles but it's not a 'pixel' wide in that when you zoom in it remains the same visual width on the screen despite the zoom. (If this makes no sense then try it.)
A couple other very minor suggestions...
OSM
oddson ·
Oh! My bug-like behaviour is affecting the original as well.
Seems SM's filled rect won't paint actual opaque lines at 1 pixel wide. So you can't make the gradients appear at full opacity.
This is also why there are visual gaps when I paint in bands greater than 1 px wide -- it doesn't paint the left-hand-edge at full opacity.
rl ·
adding 0.5 to the pixel x-coordinates (F2A) should do the trick.
oddson ·
rl wrote: adding 0.5 to the pixel x-coordinates (F2A) should do the trick.
Kinda works sometimes but not really. Drawing with the line instead works, kinda... but then it's too opaque 😕 ?
another OSM
rl ·
the schematic uses pixel coordinates, but Line Thickness of the pen is required in grid coordinates. Vertical lines drawn using a pen with thickness t and position x are drawn from x-t to x+t (x is in the center of the line), so I think the line positions should be n*(x+0.5*t)
oddson ·
D'oh! -- I got so tied up by the second sentence I didn't really understand the first. Thanks
oddson ·
Fixed the width and offset problems but then the 'gap' issue comes back.
Also there's a bug with the pixel to grid float converstion component. Reads zero if you connect it to a source before you feed it a value. (At least i think that's what it is. Will check and report when I can confirm.)
Tom7777 ·
I still think standard modules for gradient colors would be great, That way we could have gradient fills for any shapes 🙂
rl ·
updated schematic: perfomance optimized; added gradient filled arc segment. download: see first post
Tom7777 ·
Cool, thanks rl 🙂
GaryG ·
oh that arc is gorgeous... i tried something similar a while back but it looked too 'grainy'... will have to learn from your schem. 🙂
cheers.
.g
20081225 ·
Complex and beautiful modules!
Wrote something here? To have a post removed or your name hidden, write to [email protected].