Author Topic: EGSL Samples  (Read 11470 times)

Aurel

  • Guest
Re: EGSL Samples
« Reply #15 on: July 15, 2013, 05:44:17 AM »
Hej Tomek ;D
But this is not a Minkowski which i need for my fractal antenna research .
It looks similar but i need something like is presented on wikipedia....hmmmmm

Tomaaz

  • Guest
Re: EGSL Samples
« Reply #16 on: July 15, 2013, 07:23:45 PM »
Hej Tomek ;D
But this is not a Minkowski which i need for my fractal antenna research .
It looks similar but i need something like is presented on wikipedia....hmmmmm

http://en.wikipedia.org/wiki/List_of_fractals_by_Hausdorff_dimension . The only one Minkowski Fractal is Minkowski Sausage that looks like... my example. Could you post an image?

Aurel

  • Guest
Re: EGSL Samples
« Reply #17 on: July 15, 2013, 07:33:53 PM »
There are images of created antenna and minkowski fractal from wikipedia...
Yes i see,your image present hausdorf fractal 'so called minkowski sousage'.right?
« Last Edit: July 15, 2013, 07:43:47 PM by Aurel »

Aurel

  • Guest
Re: EGSL Samples
« Reply #18 on: July 15, 2013, 08:47:25 PM »
Tomek
something is wrong with egsl or with your turtle lib...
egsl run code but i see just a flash of window and then is window closed ..
what is this ???

i receive this errors:
Quote
C:\Program Files\EGSL\minkowski.lua:3: attempt to call global 'setbgcolour' (a nil value)
C:\Program Files\EGSL\minkowski.lua:3: attempt to call global 'setbgcolour' (a nil value)
C:\Program Files\EGSL\minkowski.lua:3: attempt to call global 'setbgcolour' (a nil value)
C:\Program Files\EGSL\minkowski.lua:3: unfinished string near ''setbgcolour("grey")'
C:\Program Files\EGSL\minkowski.lua:28: attempt to call global 'setcolour' (a nil value)

Tomaaz

  • Guest
Re: EGSL Samples
« Reply #19 on: July 15, 2013, 10:40:55 PM »
Tomek
something is wrong with egsl or with your turtle lib...
egsl run code but i see just a flash of window and then is window closed ..
what is this ???

You probably have an old version of the library. The new one is attached.

I will have a look at the fractal and let you know soon.


Tomaaz

  • Guest
Re: EGSL Samples
« Reply #20 on: July 16, 2013, 12:06:11 AM »
Something like this?

Code: [Select]
require "turtle"
openwindow (500, 500, 0, "Minkowski Fractal")
setbgcolour("grey")
goxy (20, 20)
turnright(90)
function mink(x, t)
if t > 0 then
t=t-1
x=x/3
mink(x, t)
turnright(90)
mink(x, t)
turnleft(90)
mink(x, t)
turnleft(90)
mink(x, t)
turnright(90)
mink(x, t)
else
forward(x * 3)
end
end
setcolour("white")

for x = 1, 4 do
mink(150, 5)
turnright(90)
end
inkey()

Change values in line 26
Quote
mink(150, 5)
to get different size (the first parameter) and depth (the second). You can also use setredraw() function to make the program work much faster.
« Last Edit: July 16, 2013, 12:14:04 AM by Tomaaz »

Aurel

  • Guest
Re: EGSL Samples
« Reply #21 on: July 16, 2013, 06:10:36 AM »
Yes i see...
It work great...
i will try translate this to Oxygen that i see is it little bit faster maybe..
thanks Tomek ;)
« Last Edit: July 16, 2013, 06:39:56 AM by Aurel »

Tomaaz

  • Guest
Re: EGSL Samples
« Reply #22 on: July 16, 2013, 09:51:09 AM »
.
i will try translate this to Oxygen that i see is it little bit faster maybe..

Try this version. It's much faster.

Code: [Select]
require "turtle"
openwindow (500, 500, 0, "Minkowski Fractal")
setbgcolour("grey")
goxy (20, 20)
turnright(90)
setredraw(0)
function mink(x, t)
if t > 0 then
t=t-1
x=x/3
mink(x, t)
turnright(90)
mink(x, t)
turnleft(90)
mink(x, t)
turnleft(90)
mink(x, t)
turnright(90)
mink(x, t)
else
forward(x * 3)
end
end
setcolour("white")

for x = 1, 4 do
mink(150, 5)
turnright(90)
end
redraw()
inkey()

Aurel

  • Guest
Re: EGSL Samples
« Reply #23 on: July 16, 2013, 06:15:02 PM »
Tomek...
I have EGSL 1.6.0
but i don't know why command setredraw() not work ???

Tomaaz

  • Guest
Re: EGSL Samples
« Reply #24 on: July 16, 2013, 06:57:41 PM »
I have EGSL 1.6.0
but i don't know why command setredraw() not work ???

It's part of my turtle library, not EGSL itself, so make sure that you have the last version of the library (I attached it to the one of my previous posts in this topic). setredraw(0) disables automatic refreshing screen after forward() or fill() is called (you do it manually by using EGSL refresh() function whenever you want), setredraw(1) enables it.
« Last Edit: July 16, 2013, 07:01:30 PM by Tomaaz »

Aurel

  • Guest
Re: EGSL Samples
« Reply #25 on: July 17, 2013, 05:47:13 AM »
Ahhh finaly work, yeah i see what for u use setredraw, for me is more cool setredraw(1)  ;)
anyway lua is fast enough.

BUT one thing really pissed me off everytime when i use EGSL IDE,it automaticaly
put me on 'My Documents' folder and this thing repeat all the time when user open new
file from disk...this is a really annoying.
I will make my own editor for EGSL because this one really drive me crazy ::)

Tomaaz

  • Guest
Re: EGSL Samples
« Reply #26 on: July 17, 2013, 10:37:03 AM »
...for me is more cool setredraw(1)  ;)

I made it default option, because this is what Logo should be about. ;)

BUT one thing really pissed me off everytime when i use EGSL IDE,it automaticaly
put me on 'My Documents' folder and this thing repeat all the time when user open new
file from disk...this is a really annoying.
I will make my own editor for EGSL because this one really drive me crazy ::)

Just use Geany. Syntax highlighting, code folding, side panel with functions and variables and many more.

Aurel

  • Guest
Re: EGSL Samples
« Reply #27 on: July 17, 2013, 05:08:48 PM »
Tomek
sorry and don't get me wrong again ;)
You know that i hate this Geany editor, i have this editor by default on my SliTaz computer
and i quickly switch to gVim, maybe for you it is a great solution ,but for me is not.
Anyway i don't know that Cyb add source code written in Lazarus for EGSL IDE
in repo,maybe i can do something there ..i will see.

Tomaaz

  • Guest
Re: EGSL Samples
« Reply #28 on: July 17, 2013, 06:54:51 PM »
You know that i hate this Geany editor...

I know. I just don't know why. ;)

Anyway i don't know that Cyb add source code written in Lazarus for EGSL IDE
in repo,maybe i can do something there ..i will see.

You can download source code from there.

Aurel

  • Guest
Re: EGSL Samples
« Reply #29 on: July 17, 2013, 07:06:33 PM »
Yes i know...
hmm i see EGSL IDE is based on LazEdit, looks interesting ...
hmm so if i want to fix this 'open' problem i must download Lazarus
eeehhh, ok i will see... ;)