🐢 B4XTurtle - Library for teachers and parents

LucaMs

Expert
Licensed User
Longtime User
Semi-solution:
B4X:
Sub DrawWave
    For i = 1 To 10000
        Turtle.MoveForward(0.1).TurnLeft(CosD(i))
    Next
End Sub
Just playing, without thinking (but sleeping ? ), I tried to add the ray:
B4X:
Sub DrawWave(r As Float)
    Turtle.SetX(10).SetAngle(0).SetSpeedFactor(2)
'    For i = 1 To Turtle.Width - 20
    For i = 1 To 5000
'        Turtle.MoveForward(0.1).TurnLeft(CosD(i))
        Turtle.MoveForward(1).TurnLeft(CosD(i) * r)
    Next
End Sub
Result?
1.gif


?
 

rabbitBUSH

Well-Known Member
Licensed User
I think you guys have been in LOCKDOWN too long : you're going in circles . . . .

at least if these were squares you could measure the paces from one corner of the lounge to the other to the other to the other to the other to the other [recursive]

I think you need to get my lockdown converter from that other post last week - you'll see a nominal time to lease from the circular motion (is it Brownian Motion I wonder)...

? ?


PS it took me a long time to remember how to calculate the area of a circle yesterday : so as they say in Dragons Den "I'm Out".

?
 

rabbitBUSH

Well-Known Member
Licensed User
B4Xers : Your next mission challenge, should you decide to accept it Mr Hunt, is to simulate Brownian Motion using Turtle Library from @Erel in Isreal. This message will self destruct in moments.

Because he has been appointed official Judge of the best solution @Erel is disqualified (and he ALSO has the inside track on use of the library ?).

The hero gets to run away with the lead actress / actor - (still to be cast in the role - suggestions welcome)
? or?
 
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI 'ignore
Private Turtle As B4XTurtle
End Sub

Which is it the Libraries for: Private Turtle As B4XTurtle. Because in code is Error. And, en other lines too.
Libraries used: JCore (Version 7.51); JFX (Version 7.50); XUI views (Version 2.23)

Thanks.
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
Funny Lib!
I haven't found a special usecase yet, but the Gcode of a 3D printer came directly to my mind and i created a gcode reader/simulator :) (very Quick&Dirty and may crash with different Slicers)
gcode.gif
 

Attachments

  • GcodeSimulator.zip
    2.9 KB · Views: 388
Last edited:

sorex

Expert
Licensed User
Longtime User
I didn't had the time yet to have a look at this retro style programming/drawing tool.

But as I had to wait for some stuff to complete at work I though I'd give it a try.

It's easy to use even for regular drawings and the rabbit mode is extremely fast.

here's another example of what can be done with it... backflipper

only using rabbitmode,clearscreen,setPenSize,setPenColor,penUp,penDown,setX,setY,moveTo in an endless loop with sleep(1000/60) in it

dolphin.gif
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
I didn't had the time yet to have a look at this retro style programming/drawing tool.

But as I had to wait for some stuff to complete at work I though I'd give it a try.

It's easy to use even for regular drawings and the rabbit mode is extremely fast.

here's another example of what can be done with it... backflipper

only using rabbitmode,clearscreen,setPenSize,setPenColor,penUp,penDown,setX,setY,moveTo in an endless loop with sleep(1000/60) in it

View attachment 94740
It looks like my 3D library
 
Top