Peano Fractals: Rainbow type has Complete Curve & Select Colors& Border lazarus / 39-Graphics ---------------------------------------------------------------------- Boleeman · 2024-03-30 12:34 A basic Peano Fractal to play around with. I worked out the level settings, but had trouble giving it a 10 pixel border (on top and on the left side). Just got a rainbow type working. Yippeee. See next reply in this thread. ---------------------------------------------------------------------- Boleeman · 2024-03-30 13:04 A colorful Rainbow Peano Fractal curve. Can change line widths and save to PNG. Slightly improved from very first version, so I called it Peano Fractal Rainbow V1b resize line widths,zip ---------------------------------------------------------------------- Boleeman · 2024-03-31 07:49 Rainbow Peano Version 2  (Bug in set line width on canvas) Had an idea of selecting which colors to include out of the 8 colors. Sorted out this (Yippie) When no colors are selected the program selects checkbox6 and then continues on. Keep getting this access error: When I use a spinedit and set the linewidth like pen.Width := seLinewidth.Value;  but if I use  Canvas.Pen.Width := 3; then I get no error. pen.Width := seLinewidth.Value; was working OK when I did not use any TCheckboxes. ---------------------------------------------------------------------- paweld · 2024-03-31 11:54 I took the liberty to modify your example and corrected the error. I set the Tag property for each checkbox and modified a few routines (I moved the check to see if the last checkbox was selected to ChecBoxClick) ---------------------------------------------------------------------- Boleeman · 2024-03-31 20:58 A great many thanks Paweld. I knew that the click event of the checkbox array was interfering with the change event of the spinedit (thought it might be a scoping problem) and the tag was not properly working, but I seemed to round and round in circles. The program now works so smoothly and produces some colorful pictures. Your code is much more stream-lined. I see you got that "if all checkboxes are unchecked" working. I was trying to achieve that but your version re- enables the last checkbox that was clicked. The different combinations of colors makes some nice and interesting (almost "camouflage-blend in" type)  fractal patterns. Thankyou once again Paweld. Love this graphics stuff. ---------------------------------------------------------------------- Boleeman · 2024-03-31 22:57 Added some TColorButtons to select the 8 different line colors. Next feature (Storing and previewing nice color combinations): In Art and Graphics there are some nice color combinations so I would like to add them in to produce even better color patterns. Add a comma delimited list of the 9 colors (8 line colors + 1 back color) to a TListbox with a TButton click. (basically recording the color values of all the TColorbuttons) Save and load the list as a simple text file. Click on a line of the TListbox to preview the pattern. I added a screenshot of what I mean. ---------------------------------------------------------------------- Boleeman · 2024-04-01 00:29 Hopefully finished now, with the presets and previewing. Can't believe it. Paweld was a big help. Could not have done it with his help. That screen shot below shows the capabilities. Enjoy. ... and Happy Easter to ALL around the world. Just noticed a bug: When previewing by clicking the listbox row Some of color entries in the listbox row are loaded correctly, others are not (checkboxes are not checked) A list with 4 entries, seems to be detected as having 1 line color. ---------------------------------------------------------------------- Boleeman · 2024-04-01 02:10 The PREVIEW BUG:  When previewing by clicking the listbox row Some of color entries in the listbox row are loaded correctly, others are not (checkboxes are not checked)[/b] A list with 4 line color entries and 1 background color seems to be detected as having 1 line color. Attached below is a preset file that gives errors. When loading to Tlistbox and then previewing the entries by clicking on a row it comes up as not having any colors selected when clearly there are multiple colors, as shown below. 3092479,33023,16776960,65535,#0 21672,2891404,26214,49087,2596096,#36 For other values, the values load OK. Like: 9552445,13839466,2293759,2937749,#0 13839466,2293759,2937749,3947775,#0 2293759,2937749,3947775,#0 Perhaps there may be a dud/hidden/unicode character in the text file? I don't know. The error seems to happen for only at certain lines. ---------------------------------------------------------------------- paweld · 2024-04-01 07:50 The error comes from the fact that you only select if the color button has the color set as it is in the list. and in the case of this item, none of the colors are set in the colorbutton.I am uploading another version, I modified the program a bit, moved some things to a separate class ---------------------------------------------------------------------- Boleeman · 2024-04-01 08:34 Hi Paweld. I could not figure out that bug. You have good problem solving skills. I tried your latest updated code. It works fantastically for loading presets and previewing. but the add entry to Listbox is where there are some bugs. The numbers are not separated by commas. Also color of background is not added to the end of each line. I get this for the preset file information: 955244529377493947775 95524453947775 3947775  Sorry to bother you about this bug.  Regards Boleeman ( Ed. ) ---------------------------------------------------------------------- paweld · 2024-04-01 09:01 fixed ---------------------------------------------------------------------- Boleeman · 2024-04-01 09:50 Wow, that was quick Paweld. Thanks for that. Your problems solving skills are great. It adds properly now to the listbox. Noticed how you made the last color entry the backcolor. Just love playing around with this graphics stuff, but seem to get bogged down with trying to fix the bugs. I will look over your coding, to learn your better techniques. Learning bits and pieces all the time. Over here its  finally started raining, after months of hot dry weather. Take care. As always, many thanks for your great help. ---------------------------------------------------------------------- Boleeman · 2024-04-02 02:50 Finally got that Left and Top Border working, as well the complete curve. The curve starts at the Top Left and finishes at the Top Right. (in previous versions there was no left and top border and there was a solid line on one side). Wow. Yip-pie ! ---------------------------------------------------------------------- HolgerT · 2025-03-23 16:57 Quote from: Boleeman on April 02, 2024, 04:50:18 amFinally got that Left and Top Border working, as well the complete curve. The curve starts at the Top Left and finishes at the Top Right. Hi, unfortunately this is not a (one) complete curve, but two! You can see it in picture in attachement. (Was created by Peano_v4b.zip) Regards Holger ---------------------------------------------------------------------- Boleeman · 2025-03-25 06:19 Yes I realized that, and then I went drifting onto other fractal graphics things.