recursion sierpinskys triangle - HELP!!

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2008
Posts: 13
Reputation: jrobw is an unknown quantity at this point 
Solved Threads: 0
jrobw jrobw is offline Offline
Newbie Poster

Re: recursion sierpinskys triangle - HELP!!

 
0
  #21
Dec 8th, 2008
strange, i see my last little post in the wrong order...

ok, lets look at it close: for 1 ir is of course only 1 triangle, because the recurive calls are not executed, for 2 its 3 + 1, for 3 it's 3*3 + 1, for 4 its ((4*3)+1)*3 +1hm.... i don't se it, maybe too tired...

i think O(n^3) or O(3^n), but 3^n would even grow faster I think, maybe It's a bit smaller than than n^3, maybe still something logarithmic, because the line are split in hals... but i can only gues right now...
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 332
Reputation: quuba is on a distinguished road 
Solved Threads: 54
quuba quuba is offline Offline
Posting Whiz

Re: recursion sierpinskys triangle - HELP!!

 
0
  #22
Dec 8th, 2008
     a = new Point(0, 443);
     b = new Point(512, 443);
     c = new Point(256, 0);
     tryAngle = new TriangleQuu(a, b, c);
try
tryAngle = new TriangleQuu(c, a, b);
to see later
Last edited by quuba; Dec 8th, 2008 at 10:08 pm. Reason: sleep time
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 254
Reputation: Antenka has a spectacular aura about Antenka has a spectacular aura about Antenka has a spectacular aura about 
Solved Threads: 65
Antenka's Avatar
Antenka Antenka is offline Offline
Posting Whiz in Training

Re: recursion sierpinskys triangle - HELP!!

 
0
  #23
Dec 8th, 2008
i think it would be much nicer to call the method with a value, which relates to what happens in recursion,
sure you are right!!!
and please don't misunderstand, but i would recommend you to look at the previous posts, and go into the topic, before y<ou post before
I have read all post in this thread. But misunderstood ... I thought you want have as smallest triangle - the smallest visible triangle (or direct set depth of recursion).
In this case, the variant with 1 condition is the best
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 2
Reputation: codeman01 is an unknown quantity at this point 
Solved Threads: 0
codeman01 codeman01 is offline Offline
Newbie Poster

Re: recursion sierpinskys triangle - HELP!!

 
0
  #24
May 11th, 2009
Can anyone help me this?
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 332
Reputation: quuba is on a distinguished road 
Solved Threads: 54
quuba quuba is offline Offline
Posting Whiz

Re: recursion sierpinskys triangle - HELP!!

 
0
  #25
May 12th, 2009
Start new thread. Present your work. Ask a specific question.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC