YOUR ACCOUNT

Login or Register to post new topics or replies
Totte
Übernerd

Posts: 1460
Filters: 107
My first very simple fractal implementation (ripped from the net) in FF.

- I never expected the Spanish inquisition
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Who??? What??? Where??? ..... smile:|
Quote
Totte wrote:
ripped from the net

Oh.....had me going for a moment there..... smile;) smile:D
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
this one in color..

- I never expected the Spanish inquisition
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
function get_sample(x, y)
local cr = (offsety-y)/0.25
local ci = (offsetx-x)/0.5
local zi = 0.0
local zr = 0.0
local i = 0

while 1 do
i = i+1
local temp = zr * zi
local zr2 = zr*zr
local zi2 = zi*zi
zr = zr2-zi2+cr
zi = temp+temp+ci
if (zi2+zr2 > BAILOUT) then
return 0,0,0,0
end

if (i > MAX_ITERATIONS) then
local r, g, b, a = get_sample_map(zi2, zr2, COLOR)
return r,g,b,1
end
end

end;
- I never expected the Spanish inquisition
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
Steve - the Lua-code was ripped from the net, the fractals was made in ff!

here it is

fractals.ffxml
- I never expected the Spanish inquisition
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Totte, have you seen our Mandelbrot example?
http://www.filterforge.com/download/b...pting.html
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
Vlad, nope, I wanted to try it myself smile;-) But I will look at that too.
- I never expected the Spanish inquisition
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Damn!!! Now I have to get into it.....might as well hardwire myself to the FF program and be fed intravenously..... smile;) smile:D
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
Redcap
Redcap

Posts: 1290
Filters: 100
Quote
Now I have to get into it.....might as well hardwire myself to the FF program and be fed intravenously.....


If you know Lua script, FF can do that for you...smile:D



If you are bored check out my unpractical math website
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
Quote
Damn!!! Now I have to get into it.....might as well hardwire myself to the FF program and be fed intravenously.....


From the look of that picture, RGB is already flowing in your veins...
- I never expected the Spanish inquisition
  Details E-Mail
Paul Wolfe
Mr Wolfie
Posts: 93
Filters: 13
I took a look at Vladimir's Mandelbrot example went into the code (Map Script component) and changed the Function
from this:

function prepare()
radius_sq = 4
MAX_ITERATION = 50
end;

to this:

prepare()
radius_sq = 100
MAX_ITERATION = 500
end;

I rendered at 2000 X 2000 pixels and the detail is just incredible. Now it took around 5 minutes to render on a quad computer, but worth it. I have attached this render scaled down to 600 X 600 to give you an idea, but it looses a lot in the scaling.

  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Quote
Redcap wrote:
If you know Lua script, FF can do that for you...

Well, looks like I'm going to have to learn it.....can't let you guys have all the fun..... smile;) smile:D

I'm going to miss the good old days.....randomly connecting components without a clue.....submitting filters if I happenned to stumble acrossed something cool.....ahhh, the memories..... smile;) smile:D LOL.....
Quote
Totte wrote:
From the look of that picture, RGB is already flowing in your veins...

Want some screwy RGB.....ya come to StevieJ..... smile;) smile:D LOL....

Paul, nice one!!! smile8) smile8) smile8) I've gotta get my arse in gear and get into this..... smile:devil:

Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
Paul Wolfe
Mr Wolfie
Posts: 93
Filters: 13
Thanks Stevie, by the way I don't understand the Scripting either. Just playing around with the numbers. I do have an understanding of Visual Basic and some "C" but hope this helps to learn this Scripting Language. There are just toooooo many Programing Languages to learn and not enough time.
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Hey Paul.....I learned C++ a while back, but haven't touched it in over 10 years....but I have done more recent work in AutoLisp with AutoCad....so Lua shouldn't be too difficult to get into.....guess I've become spoiled with just plugging components together, setting parameters, and voila!!! smile;) smile:)
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Is it just a matter of time before we start getting... more fractals in FilterForge?

Paul Bourke has great references if you're interested.
http://local.wasp.uwa.edu.au/~pbourke/fractals/
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
I just got an idea from the Berestroika sample, where sprites are stored as an array of pixeldata.
Maybe I should write a little tool that takes a .png-image and converts it into a map[] array to paste into a script component. Now we a possibility to have prefabricated bomber particles...

Anyone interested in such a little hack?
- I never expected the Spanish inquisition
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
I was kinda going in that direction, writing the aux routines needed for that, but FF ppl didn't like that..lol

I was aiming at creating an unsafe script that would dump the table script code to a file or something. But I'm waiting to see if they come up with a solution to the memory consumption overhead
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Totte wrote:
I just got an idea from the Berestroika sample, where sprites are stored as an array of pixeldata. Maybe I should write a little tool that takes a .png-image and converts it into a map[] array to paste into a script component.


Hint: I think you can also do vectors using this approach. Store an array of vertices with their bezier handles, and provide a sampling function which either just hit-tests the spline and returns true or false, or returns the distance from the sample point to the nearest point on the spline -- this will allow you to do true vector-based bevels.
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
Vlad: yeah, the opportunities are endless smile;-) I think I'll start out with a bomber particle builder, maybe get some free time soon. Right now my FF time is limited, real work to be done.
- I never expected the Spanish inquisition
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Vladimir Golovin wrote:
Hint: I think you can also do vectors using this approach. Store an array of vertices with their bezier handles, and provide a sampling function which either just hit-tests the spline and returns true or false, or returns the distance from the sample point to the nearest point on the spline -- this will allow you to do true vector-based bevels.


Good tip. I might try this out. Investigating this possibility, I find that apparently you can't get the distance to a bezier curve directly (mathematically), but you have to do calculate the distance to each line segment that approximates the curve and pick the smallest distance. That small inconvenience aside, this would open up some interesting new possibilities, such as the one you mention, or for instance providing bezier curve control for creating shapes to lathe. Not to mention creating types of rounded shapes that were not possible before...
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,531 Posts
+36 new in 30 days!

15,347 Topics
+72 new in year!

Create an Account

Online Users Last minute:

17 unregistered users.