Search found 675 matches

by Henko
Mon May 13, 2013 12:12 pm
Forum: BASIC programs
Topic: Fast fill_poly function
Replies: 2
Views: 3564
Flag: Netherlands

Fast fill_poly function

' I forgot to use the graphics lock and unlock mechanism. ' Moreover the filling lines are now drawn from the centre of gravity point of the figure, wich makes the line shorter, and ' less lines are needed (about 50%). ' option base 1 option angle degrees dim x(10),y(10) for i=1 to 5   read x(i),y(i...
by Henko
Mon May 13, 2013 10:49 am
Forum: BASIC programs
Topic: Draw_poly and fill_poly functions (slow!)
Replies: 0
Views: 4565
Flag: Netherlands

Draw_poly and fill_poly functions (slow!)

option base 1 dim x(10),y(10) for i=1 to 5   read x(i),y(i)   next i data 220,600, 240,260, 500,220, 600,500, 350,700 graphics graphics clear .8,.8,.8 fill_poly(5,x,y,0.2,0.8,0.5,1) draw_poly(5,x,y,1,0,0,3) end def draw_poly(n,x(),y(),r,g,b,thick) draw color r,g,b ! draw size thick n=n+1 ! x(n)=x(1)...
by Henko
Fri May 10, 2013 10:45 am
Forum: BASIC programs
Topic: The "Automaton" (contains program and data-file)
Replies: 0
Views: 5482
Flag: Netherlands

The "Automaton" (contains program and data-file)

'  "Automaton" '  The "automaton" is a very simple digital machine,  '  extensively described in the  december 1986 edition of the Byte  '  magazine. It consists of a one-dimensional array of elements '  that can each have 1 out of 4 statusses. '  By assigning a color to each of the statusses, the a...
by Henko
Thu May 09, 2013 10:44 am
Forum: BASIC programs
Topic: Sphere ( animated )
Replies: 1
Views: 3121
Flag: Netherlands

Re: Sphere ( animated )

Nice effect, the "glowing" globe.
Congrats with your first SB program. As you can see, I'm also porting some of my programs from the Basic! forum. Now busy to rewrite the "Automaton". The much higher execution speed of SB is an advantage here.
by Henko
Thu May 09, 2013 7:43 am
Forum: BASIC programs
Topic: Preview "Automaton"
Replies: 0
Views: 5056
Flag: Netherlands

Preview "Automaton"

'  "Automaton" '  The "automaton" is a very simple digital machine,  '  extensively described in the  december 1986 edition of the Byte  '  magazine. It consists of a one-dimensional array of elements '  that can each have 1 out of 4 statusses. '  By assigning a color to each of the statusses, the a...
by Henko
Wed May 08, 2013 4:18 pm
Forum: BASIC programs
Topic: Meter object
Replies: 0
Views: 5013
Flag: Netherlands

Meter object

option angle degrees graphics fill color .8,.8,.8 graphics clear .8,.8,.8 rad=150 rmeter("km/hr","R",200,200,rad,0,200,0,1) rmeter("RPM","b",500,200,130,20,60,0,1) for t=0 to 2000 step 3   speed=70+60*sin(t) ! rpm=40+20*sin(-.7*t)   rmeter("km/hr","R",200,200,rad,0,200,speed,0)   rmeter("RPM","b",50...
by Henko
Wed May 08, 2013 7:46 am
Forum: BASIC programs
Topic: "Slider" object (using new touch statement)
Replies: 5
Views: 6997
Flag: Netherlands

Re: "Slider" object (using new touch statement)

Nice portable (def) sliders... :D How can I make the blue slider transparent ( alpha ) ? Tried but made all but the blue one transparent... All sliders use the same function code. You "personalize" each occurance of a slider via the parameters passed in the calling statements. So, if you want one s...
by Henko
Tue May 07, 2013 1:31 pm
Forum: BASIC programs
Topic: Color selector with simulaneous operating sliders
Replies: 1
Views: 3224
Flag: Netherlands

Color selector with simulaneous operating sliders

gosub init_prog loop1: if ind(1)>=0 then r=ind(1)/100 if ind(2)>=0 then g=ind(2)/100 if ind(3)>=0 then b=ind(3)/100 fill color r,0,0 fill rect x(1)+2,yo-158 to x(1)+78,yo-62 fill color 0,g,0 fill rect x(2)+2,yo-158 to x(2)+78,yo-62 fill color 0,0,b fill rect x(3)+2,yo-158 to x(3)+78,yo-62 fill color...
by Henko
Tue May 07, 2013 12:09 pm
Forum: BASIC programs
Topic: "Slider" object (using new touch statement)
Replies: 5
Views: 6997
Flag: Netherlands

Re: "Slider" object (using new touch statement)

These sliders cannot be used simultaneously. Indeed! They are polled one after another. But i think it is a theoretical point. In practice one would operate only one slider at the time. Moreover, due to limitations of SB one could never operate more than 11 sliders simultaneously :D . This too is a...
by Henko
Tue May 07, 2013 10:08 am
Forum: BASIC programs
Topic: Memory game using touch statement; runs on all iDevices
Replies: 10
Views: 12437
Flag: Netherlands

Re: Memory game using touch statement; runs on all iDevices

Mr. Kibernetik wrote:I found what was the problem with this error.
Try touching top toolbar, and you will understand what happens - negative Y is allowed.
Thanks for debugging ☺ i'll look into it.