Logo

By on 7/9/2011 6:35 AM ()
By on 5/22/2011 9:45 PM ()

thanks

By on 12/8/2010 12:42 AM ()

According to investigation statistics,this site :[link:www.onlinenewshop.com] is the best choose for the peopel who want to enjoy everything.

By on 12/8/2010 12:41 AM ()
By on 5/19/2010 4:01 AM ()
By on 4/1/2010 9:20 AM ()
By on 3/31/2010 11:23 PM ()

I've updated this cool sample to compile and run on latest F# release (with warnings), see post and attached code here: [link:www.trelford.com]

By on 10/5/2009 12:27 AM ()

Logo

By on 10/5/2009 12:21 AM ()
By on 6/20/2008 8:37 PM ()
By on 6/5/2008 2:03 AM ()

Here are some samples, without any order (the last one runs a bit longer):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// *
canvas 400 500
to spiral :x repeat :x (fd 4 lt * repcount 1.1) end
spiral 10000
---------------------
// *
canvas 400 400
to spiral :x repeat :x (rt 90 fd * repcount 3) end
spiral 100
---------------------
// *
canvas 1000 1000
to polygon [:x :size] repeat :x (fd :size rt / 360.0 :x) end
repeat 500 (polygon 13 20 lt 10 fd * repcount 1.01)
---------------------
// *
canvas 1000 1000
to polygon [:x :size] repeat :x (fd :size rt / 360.0 :x) end
repeat 500 (polygon 3.5 / repcount 4 lt 10 fd * repcount 1.01)
 
---------------------
// *
canvas 1000 1000
to polygon [:x :size] repeat :x (fd :size rt / 360.0 :x) end
repeat 10 (polygon + 5 / repcount 10 30  penup fd 60 pendown)
	
---------------------
// *
canvas 600 800
to spiral :x (repeat :x (fd 2 lt * repcount 2.17)) end
spiral 100000
---------------------
// *
canvas 1200 2500
to spiral :x (repeat :x (fd 2 lt * repcount pi)) end
spiral 300000
By on 8/11/2007 10:42 AM ()

My seven year old (and me) are having fun with this. Can you post the logo you used to make the sample images?

By on 7/31/2007 5:54 PM ()

You can use the new list comprehension syntax to get rid of dealing with mutable data. For instance, instead of a for loop and references, you can write the Repeat match case in the eval function as

1
2
3
4
5
   | Repeat (num, e, pos) -> 
        let _, gstate', i = eval1 state gstate num in 
        IEnumerable.fold (fun (state, gstate, _) j -> 
           let state' = add_var state ":repcount" j in 
           eval im state' gstate e) (state, gstate', None) { 1.0 .. i } 

Note that this fixes a bug as well, and evaluating the num expression is now reflected in the graphics state. Thanks to Don for pointing this out!

By on 12/4/2006 3:51 PM ()

Project attached - have fun!

By on 12/2/2006 9:23 AM ()

This looks great!

Could you attach the whole F# project, so even a lazy people like me can play with it? Hm, but it looks really cool, I have to try it anyway :-).

By on 12/2/2006 7:33 AM ()

Hi guys - I just posted an article on implementing a small Logo interpreter and produced some nice Logo...

By on 12/1/2006 4:37 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper