Posted: Fri Oct 08, 2004 10:29 pm
Okay.... what better way is there?
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
That's the most undescriptive, terrible description you could of written. I think I may of even figured out how to do it. Then I reread your post, and now I don't what in the HELL you want to do. Draw a picture or something.Arce wrote:If anyone of you ever checked out my development topic, you'd know that I would like some guidence on this. As I'm sure we all know, there is a random fractal with a triangle, and inside is a triangle, dividing it into three triangles, and a triangle in those three dividing each into three, and so on. I would like to make a program that does that in blitz. I have no clue where to strat. Guidence would be nice, IF anyone had the time over all the NEStix stuff.
Code: Select all
y2 - y1 rise
-------- = ------
x2 - x1 run
Code: Select all
Global y1 = 0
global y2 = 0
global x1 = 0
global x2 = o
Code: Select all
;Set graphics mode
Graphics 1024,768
;Seed the random generator
SeedRnd(MilliSecs())
;Set buffer to backbuffer
SetBuffer BackBuffer()
Global manx# = 0.0
Global many# = 0.0
Global n#
Global timer = 0
Cls
Color 150,150,150
Text 0,600,"Generating Fractal"
Text 0,612,"Press Space to cancel"
Text 0,624,"Press Esc to exit"
Flip
For i = 0 To 430000
n = Rnd(0,1)
If n <= (0.333333)
Color Rand(100,255),0,0
;Color 255,0,0
;Color Rand(0,255),Rand(0,255),Rand(0,255)
manx = manx * .5
many = many * .5
ElseIf n > (0.333333) And n <= (0.666666)
Color 0,Rand(100,255),0
;Color 0,255,0
;Color Rand(0,255),Rand(0,255),Rand(0,255)
manx = .5 * (.5 + manx)
many = .5 * (1 + many)
ElseIf n > (0.666666)
Color 0,0,Rand(100,255)
;Color 0,0,255
;Color Rand(0,255),Rand(0,255),Rand(0,255)
manx = .5 * (1 + manx)
many = .5 * many
EndIf
If timer < 0
Flip
timer = 1500
Else
timer = timer - 1
EndIf
If KeyDown(57) Then Exit
pix(manx,many)
Next
Flip
While Not KeyDown(1)
;just sit back and take a gander
Wend
End
Function pix(x#,y#)
Plot(x*GraphicsWidth(),y*GraphicsHeight())
;Oval x*GraphicsWidth(),y*GraphicsHeight(),4,4,1
End Function
I disagree. Yes, clueless I was sorta. But you VERY well coulda made something semi-similar out of lines as well. A fractal is not a preset thing. A fractal is chaos. Almost undefinable. You can't set rules for how fractals are made, nor can you make rules for one fractal and use it for another.JS Lemming wrote:No offense, but you guys are clueless. First off, you don't make fractals with objects like triangles, that is what the actuall fractal is for. You make the fractal out of points or pixels.
There is no predetermined way to make a fractal.dictionary.com wrote: Fractals:
A geometric pattern that is repeated at ever smaller scales to produce irregular shapes and surfaces that cannot be represented by classical geometry. Fractals are used especially in computer modeling of irregular patterns and structures in nature.