Recent

Author Topic: Peano Fractals: Rainbow type has Complete Curve & Select Colors& Border  (Read 3926 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 874
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.
« Last Edit: April 02, 2024, 04:54:44 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractal: Space filling curve
« Reply #1 on: March 30, 2024, 02:04:33 pm »
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
« Last Edit: March 31, 2024, 10:05:38 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #2 on: March 31, 2024, 09:49:35 am »
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.


« Last Edit: March 31, 2024, 10:06:39 am by Boleeman »

paweld

  • Hero Member
  • *****
  • Posts: 1351
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #3 on: March 31, 2024, 01:54:57 pm »
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)
Best regards / Pozdrawiam
paweld

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #4 on: March 31, 2024, 10:58:52 pm »
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.
« Last Edit: March 31, 2024, 11:05:52 pm by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #5 on: April 01, 2024, 12:57:21 am »
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.
« Last Edit: April 01, 2024, 01:03:55 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #6 on: April 01, 2024, 02:29:55 am »
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.


« Last Edit: April 01, 2024, 03:01:54 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #7 on: April 01, 2024, 04:10:52 am »

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

  • Hero Member
  • *****
  • Posts: 1351
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #8 on: April 01, 2024, 09:50:31 am »
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
Best regards / Pozdrawiam
paweld

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #9 on: April 01, 2024, 10:34:44 am »
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. )
« Last Edit: April 01, 2024, 10:37:01 am by Boleeman »

paweld

  • Hero Member
  • *****
  • Posts: 1351
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #10 on: April 01, 2024, 11:01:32 am »
fixed
Best regards / Pozdrawiam
paweld

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #11 on: April 01, 2024, 11:50:46 am »
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.
« Last Edit: April 01, 2024, 11:52:48 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #12 on: April 02, 2024, 04:50:18 am »
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 !
« Last Edit: April 02, 2024, 04:56:36 am by Boleeman »

HolgerT

  • Newbie
  • Posts: 3
Re: Peano Fractals (2 types): Now Added a Rainbow type
« Reply #13 on: March 23, 2025, 05:57:29 pm »
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.

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

  • Hero Member
  • *****
  • Posts: 874
Re: Peano Fractals: Rainbow type has Complete Curve & Select Colors& Border
« Reply #14 on: March 25, 2025, 07:19:37 am »
Yes I realized that, and then I went drifting onto other fractal graphics things.

 

TinyPortal © 2005-2018