Carpet Roll Out: Design some Carpets Now using BgraBmp lazarus / 39-Graphics ---------------------------------------------------------------------- Boleeman · 2024-07-06 06:41 Getting a bit cold and chilly here in Melbourne, Australia. Warming up with some nice hot coffee and Chocolate. A Carpet Design (and Intricate Pattern ) Program. Now using BgraBmp, with big speed increase Please go down to later threads. Added a TListbox to save and load all the design settings. Load the attached txt file with the settings (in the zip file)  to see some nice designs. A bit slow on the rendering but getting some nice curves. Maybe BgraBmp might speed up the rendering? Or possibly Multi-threading? Some curves are fractal like, and others give a carpet/cross stitch pattern. First attached png is like a Symmetrical/Reflected Mandelbrot type curve. Second attached png is a carpet design. ---------------------------------------------------------------------- circular · 2024-07-06 15:05 Seems like a pleasant idea to stay warm with coffee and chocolate. To do multi-threading with TCanvas, I think you need to create multiple TBitmap objects and do a thread in each one. With BGRABitmap, you can do some things on the same bitmap. It depends a bit what you do but you can create a Canvas2D or a CanvasBGRA object for each thread. ---------------------------------------------------------------------- Curt Carpenter · 2024-07-06 15:15 Have you taken a look at https://wiki.freepascal.org/Developing_with_Graphics ?   It's been a long time, but as I recall it has some pointers on speeding graphics up. ---------------------------------------------------------------------- paweld · 2024-07-07 05:11 with CanvasBGRA from BGRABitmap is much faster - about 15 times ---------------------------------------------------------------------- Boleeman · 2024-07-07 07:09 Thanks Paweld for that BgraBmp version. For some reason the one I tried with Bgrabmp is darker in color than your version. I changed the opacity of BgraBmp to zero. Not sure is your bgrabmp version set to opacity = 128 ? Can't believe the massive speed improvement with bgraBmp. I just love the extra detail in the 3rd attached png picture file. ---------------------------------------------------------------------- Boleeman · 2024-07-07 08:11 And just BgraBmp only version, without TImage. Now 2 BgraBmp versions. 2nd version has more vivid colours and greater detail. The filled sections seem to be continuously filled, unlike the previous grainy fills ---------------------------------------------------------------------- circular · 2024-07-07 09:01 Hi Boleeman, Interesting tapestry! The speed improvement probably comes mainly from the fast access to pixels, when the F function uses Pixels property. About the colors, it looks like the background color is different. You can try filling first the bitmap with black for example. Warm regards ---------------------------------------------------------------------- Boleeman · 2024-07-07 13:02 Just letting people know I am getting some nice patterns by using: A = 71 and changing B to different values extended up to 300. As shown in the pngs below, just by changing the value of B by 2 from 221 to 223 changes the fuzzy dots to squares. Kinda seems this is another superformula for patterns.