Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!binfeed1.tudelft.nl!tudelft.nl!binfeed2.tudelft.nl!news2.tudelft.nl!not-for-mail
From: Maarten van Reeuwijk <maarten@remove_this_ws.tn.tudelft.nl>
Subject: Re: Function for Kochs snowflake
Newsgroups: comp.soft-sys.matlab
Date: Thu, 04 Jan 2007 21:04:04 +0100
References: <ef4a06b.-1@webcrossing.raydaftYaTP> <C9702DE39F9829662A697201A9D08175@in.webcrossing.raydaftYaTP> <ef4a06b.1@webcrossing.raydaftYaTP> <936b3$459b06cd$82a1bcd4$14312@news1.tudelft.nl> <ef4a06b.3@webcrossing.raydaftYaTP> <ef4a06b.4@webcrossing.raydaftYaTP>
Organization: Delft University of Technology
User-Agent: KNode/0.9.2
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
Message-ID: <a2e7f$459d5d33$82a1bcd4$28811@news2.tudelft.nl>
X-Complaints-To: sysadmin@dto.tudelft.nl
Lines: 27
NNTP-Posting-Host: duttwtm.ws.tn.tudelft.nl (130.161.188.212)
NNTP-Posting-Date: Thu, 04 Jan 2007 21:01:55 +0100
X-Trace: a2e7f459d5d332704197128811
Xref: news.mathworks.com comp.soft-sys.matlab:386049



Ulrika wrote:

> YEEES
> I´ve got it!
> 
> % insert the Koch generator here
> angle1(4*j-3:4*j) = [angle(j), pi/3, -2*pi/3, pi/3];

Yep that is it!

> Now is the diffucult part left. Try to understand what the diffrent
> parts of the code does.

It is not so difficult. All you have to do is make some sketches of the data
representations at different levels and an elementary trigonometrical
calculation to calculate the next point.

Hint: by removing the semicolons at the end you can see how the algorithm
works.

Good luck, Maarten

-- 
===================================================================
Maarten van Reeuwijk                    dept. of Multiscale Physics
Phd student                             Faculty of Applied Sciences
maarten.vanreeuwijk.net              Delft University of Technology