Title: Dumb Down Triangle Inequaltiy / Stripe Average / Curvature avg coloring methods Post by: MandelBRO on July 08, 2017, 03:15:39 AM Please help me understand the formulas to generate the band colorings of a fractal that use the formulas Triangle Inequality / Stripe Average / Average Curvature...etc as explained by JUssie Harkonen.
I am not a math genius so it needs to be dumbed down. It seems like when I read his thesis... i think I understand it... but when I go to implement it, It's not working. It's close..... It seems like I'm not averaging far enough ahead or behind.... and when I try to average, it always loooks way worse.... all one color..... Not sure if i'm averaging incorrectly.... or using the value I obtain incorrectly. I have read the two threads that talk about this subject and still do not understand. I have tried many ways and i can't seem to get it to eliminate the banding:
I am not sure if the things I have tried WERE correct idea but implemented INCORRECTLY...... or just plain wrong. Here's my code: I've left any code out that I figured was unimportant/ didn't affect calculations Code: For Y = 1 To H ' Image Height Here's one of the last fractals I generated attached. I have visited many, many....many bulletin boards in my days seeking answers....and have always found. I have never posted a question myself because I've always found the answer and understood it enough to continue on. Please excuse any newbie mistakes I may have made in making this post. Title: Re: Dumb Down Triangle Inequaltiy / Stripe Average / Curvature avg coloring methods Post by: MandelBRO on August 21, 2017, 12:12:02 AM Nevermind! After a lot more trial and error, I finally figured out what I was doing wrong. One thing was I was using the wrong value of Z. I should have been using the last value of Z before the escape. I included the calculation for the upper and lower bounds correctly. I thought just using the previous Z value was the same as subtracting the real and imaginary parts from the Z value... ... Also I realized the the value that it generated for the color is a number less than 1 and multiplying that number by the total colors gave me a color in an indexed palette..... but you can use that number directly if you use the math.sin and freguency phase method to calculate the actual color at run time. I got it to work doing the T.I.A. method and when that worked I went back and applied the same part to my angle calculations and it made the smooth lines like described by Jussi Harkonen.
Here's what it looks like now.... all smooth and no bands! Hooray! Title: Re: Dumb Down Triangle Inequaltiy / Stripe Average / Curvature avg coloring methods Post by: quaz0r on August 21, 2017, 12:34:52 AM thanks for the posts on this; its one of the endless number of things i plan to implement but havent gotten around to yet :D |