|
From: Andy G. <aj...@gm...> - 2012-01-29 22:39:08
|
I was wrong on the file name (hey, it's been twelve years :-). Everything you need is in DrawLines.pas. There are quite a few comments, so hopefully it's clear. Look at DrawBezier and FractalLine, and the subroutines that those call. Bezier does use De Castigilu's as I suspected (although I'm sure I spelled it wrong). Because it's so dead simple I know that one by heart (read the comments for the explanation). The Fractal algorithms are of my creation. They use a seed to fill a small table (255 elements) with pseudo-random numbers. Then they recursively split the line in the center, and move the center point some fraction along the perpendicular, depending on the next "random" table entry and the "width" (or severity of the deformation). The random table was done to make it easy to get repeatable "random" numbers that wouldn't change depending on the zoom level or line length. That's basically the same method regardless of whether it's a simple line or a curved one, or if there are any linestyles applied. --Andy > Hello everyone. > I would like to know if someone know how curve and fractal algo works, or where they are in delphi sources. I am not familiar at all with the old sources, so it could allow me to avoid many time in my rewrite if I could just know how to do (or where are) those effects. > Thanks in advance. > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2_______________________________________________ > Autorealm-develop mailing list > Aut...@li... > https://lists.sourceforge.net/lists/listinfo/autorealm-develop |