Title: Re: Random SnowFlakes: Better Javascript conversion to Lazarus needed !
Post by: Boleeman on December 02, 2024, 05:08:57 am
Sorry about the late reply: Been a bit crook lately with a bug.
Thanks Dzandaa and Roland57 for your replies about snowflakes.
Roland57: Compiled your Cairo Snowflake Lazarus source after downloading GTK from http://downloads.sourceforge.net/gladewin32/gtk-2.12.9-win32-2.exe I tried installing GTK3 runtime but was getting an error after compiling the Cairo snowflake code..
Also remembered seeing a few interesting cpp and CSharp snowflake examples on Codeproject ages ago. Went to the Codeproject site yesterday and it looks like it has gone by way of the DODO .... Shutdown.
I compiled a CSharp Xmas Snowflakes code, but the flakes seem quite ordinary. There was another Codeproject example that had some intricate random snowflakes but I can't find where I put it.
Title: Re: Random SnowFlakes: Better Javascript conversion to Lazarus needed !
Post by: Laksen on December 02, 2024, 07:17:25 am
That's some well obfuscated code...
I think, minus the antialiasing and stuff this gets close
Title: Re: Random SnowFlakes: Better Javascript conversion to Lazarus needed !
Post by: Boleeman on December 02, 2024, 08:46:51 am
Laksen, that's fantastic.
Got the thickness working and Multiple Flakes.
I wonder if we could possibly smooth the flakes a bit ?
Made a small update: Realized that some curves were not that random, so put Randomize in the form's OnCreate.
Title: Re: Random SnowFlakes: Multiple Flakes but Smoothing Required
Post by: Boleeman on December 02, 2024, 09:05:23 am
I tried applying a Blur filter from TBgrabmp. A bit slower on the rendering now. Would be nice if we could make the lines SVG.
What else could we possibly try to make the lines look smoother?
Title: Re: Random SnowFlakes: Multiple Flakes but Smoothing Required
Post by: Thaddy on December 02, 2024, 10:37:20 am
I had to invert the colours to obtain snowflakes....
Title: Re: Random SnowFlakes: Multiple Flakes but Smoothing Required
Post by: Boleeman on December 02, 2024, 11:26:29 am
Great idea Thaddy.
White Snowflakes on a black background !
Title: Re: Random SnowFlakes: Multiple Flakes but Smoothing Required
Post by: Boleeman on December 02, 2024, 12:24:18 pm
Render to a TBgrabmp control.
Title: Re: Random SnowFlakes:
Post by: Boleeman on December 03, 2024, 09:01:13 am
Sort of feeling like I need to start looking into fpVectorial to create some vector (svg) curves.
Javascript does svg well, but would like to look at Lazarus methods to do vector graphics.
Title: Re: Random SnowFlakes:
Post by: zamtmn on December 03, 2024, 09:23:12 am
On topic of the upcoming holidays - it will be useful https://habr.com/ru/articles/246895/
Title: Re: Random SnowFlakes:
Post by: Boleeman on December 03, 2024, 09:07:14 pm
Thanks zamtmn for that interesting Snowflake Maker information. And with Lazarus source.
I also came across a Snowflake Generator Webpage which does snowflakes as well. The page saved OK so I can run it on my computer without connecting to the Net. Might try to make something similar in Lazarus.
Late 2 png attachments: Compiled the program from zamtmn's "snowflaker" site suggestion and tested it out. It uses Bezier type curves. Takes a bit of getting used to, but has real unique curve potential. COOL !
Thanks zamtmn.
Title: Re: Random SnowFlakes:
Post by: Boleeman on January 10, 2025, 06:34:41 am
Found a nicely rendered Snowflake Maker (but it for paying customers).