Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
-*-*-*-*-*-*-*-*
Author Message
MysticAngel

Posted: Sat Mar 22, 2003 10:49 pm   Post subject: -*-*-*-*-*-*-*-*

can u give me some points and tips on how to make julia sets.

Tony

Posted: Sat Mar 22, 2003 11:29 pm   Post subject: (No subject)

first - Post subject: -*-*-*-*-*-*-*-* is NOT very descriptive. In future people may just ignore the post and it will take a while until someone answers it.

second - what exactly are julia sets?
Tony's programming blog. DWITE - a programming contest.
Catalyst

Posted: Sat Mar 22, 2003 11:38 pm   Post subject: (No subject)

they are a fractal set
MysticAngel

Posted: Sun Mar 23, 2003 12:12 am   Post subject: julia sets

julia sets are a type of fractals.
Asok

Posted: Sun Mar 23, 2003 2:51 am   Post subject: (No subject)

What's a fractal set?
Dan

Posted: Sun Mar 23, 2003 11:38 am   Post subject: (No subject)

i shucred the web for some info on this and i fownd the flowing infomation wich may be help full:

Quote:

How can I build a Julia set?
Pick a point on the complex plane (let's call it C). The corresponding complex number has the form: x_coordinate + i*y_coordinate. The following algorithm produces the Julia set associated with C: given a generic point Z on the complex plane, this algorithm determines whether or not it belongs to the Julia set associated with C, and thus determines the color that should be assigned to it.
In order to see if Z belongs to the set, we must iterate the function Zn+1 = Z2n + C using Z0 = Z. What happens to the initial point Z when the formula is iterated? Will it remain near to the origin or will it go away from it, increasing its distance from the origin without limit? In the first case, it belongs to the Julia set; otherwise it goes to infinity (infinity is an attractor for the point) and we assign a colour to Z depending on the speed the point "escapes" from the origin. In order to produce an image of the whole Julia set associated with C, we must repeat this process for all the points Z whose coordinates are included in this range: -2 < x_coordinate < 2 ; -1.5 < y_coordinate < 1.5

Note that while the Mandelbrot set is connected (i.e. it is a single piece), a Julia set is connected only if it is associated with a point inside the Mandelbrot set. This is just one example of the relationships between the Mandelbrot set and Julia sets.
Example: the Julia set associated with C1 is connected; the Julia set associated with C2 is not connected (see image below).

Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
MysticAngel

Posted: Tue Mar 25, 2003 6:55 pm   Post subject: (No subject)

k i dont know why it isnt working. the below code is the basic algorithim. i know that there is some error at the first exit statement. i tried everything but it doesnt seem, to ork. the count + 55 is the colors

var p : real
var q : real
var maxcount : int
var x, y : int := 1
var imaxx : real
var imaxy : real
var rx, rx2 : real
var ry, ry2 : real
var t : real

var iwin2 : int
var count : int := 0

put "Please enter a value for p"
get p
put "Please enter a callue for q"
get q
put "Please enter a range between 20 to 200)"
get maxcount
imaxx := p
imaxy := q
iwin2 := Window.Open ("graphics : 500; 500,nocursor")
Window.Select (iwin2)

loop
rx := 3.5 / imaxx * x - 1.75
ry := 3.5 / imaxy * y - 1.75

loop
loop
count := count + 1
rx2 := rx * rx - ry * ry + p
ry2 := 2 * rx - ry + q
rx := rx ** 2
ry := ry ** 2
exit when rx * rx + ry * ry < 4 or count = maxcount
if count < maxcount then
count := count + 55
else
count := 0
end if
Draw.Dot (x, y, count + 55)
end loop
end loop
end loop
Asok

Posted: Tue Mar 25, 2003 7:53 pm   Post subject: (No subject)

um... you seem to have a lot of loops in that, I haven't run the code but I'm going to assume that may be your problem

Tony

Posted: Tue Mar 25, 2003 8:33 pm   Post subject: (No subject)

no, not the loops... your values overflow and cause program to crash Turing just cant handle that kind of numbers... You need to use a modern 32bit comiler like VC++.

the values of X and Y never change they always stay 1,1 no matter what.

and I dont see the use for rx2 and ry2 ether. I think you're missing something (or have extra?)
Tony's programming blog. DWITE - a programming contest.
MysticAngel

Posted: Tue Mar 25, 2003 9:15 pm   Post subject: (No subject)

ya i know that i am missing something. I get the values of maxx and maxy frlom the values that i input from p and q. but the problem is what are values of x and y. cuz i think that the dots that are ouputed into an image are in a loop. and for the dots to make an image the x and y values have keep changing. so x,y cant be 1,1. can u think a way to get the x and y values ??
Asok

Posted: Tue Mar 25, 2003 9:20 pm   Post subject: (No subject)

put x
put y

simple but if u want to know the value of a variable it works
MysticAngel

Posted: Tue Mar 25, 2003 9:26 pm   Post subject: (No subject)

yeah but if the values of x and y are always 1 ,1 as i declared them... what's the point in oputping them.
MysticAngel

Posted: Tue Mar 25, 2003 10:20 pm   Post subject: (No subject)

Do u know any way to get the values for x and y
Tony

Posted: Tue Mar 25, 2003 10:46 pm   Post subject: (No subject)

what MysticAngel is trying to say is "how to calculate X and Y values?" which I dont know.

I tried looking up some info from internet, but i cant understand their formulas. I dont see the relation between all those numbers and where does i come from? I'm very
Tony's programming blog. DWITE - a programming contest.
Catalyst

Posted: Tue Mar 25, 2003 10:54 pm   Post subject: (No subject)

i have created a working julia set generator that i will post soon, maybe that will help
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: