none
small basic graphic and animations and more (15) RRS feed

All replies

  • added slider to Nonki's opacity demo: PXL775

    Tuesday, July 28, 2020 7:36 AM
  • tetris update: TBS986

    • reduced to 400 lines
    • keys changed
    • colors changed, dots instead of squares, shadows
    • score print changed
    • ld xtension req.

    Tuesday, August 4, 2020 10:29 AM
  • update: PDN498

    • added positioning help guide
    • bg gradient

    Tuesday, August 4, 2020 5:31 PM
  • updt of nonky's ldybug: SVH897

    • shading
    • rotation and zoom
    • colors 

    Monday, August 17, 2020 8:04 PM
  • "e" calculating: LCQ857

     
    Thursday, August 20, 2020 9:34 AM
  • from ZX basic to sb:

    #1: functions

    SB+LD
    or eqv. code
    ZX code params result
    Math.Abs(n) ABS n number Absolute magnitude
    Math.ArcCos(n) ACS n number Arccosine in radians. [-1 to+1]
    a And b {bool} a AND b binary operation,
    right operand always a number.

    LDBits.AndBits(n1,n2)
    Numeric left operand:
    A AND B =0 {if B=0}
    A if B<>0
    Math.ArcSin(n) ASN n number Arcsine in radians. [-1 to+1]
    Math.ArcTan(n) ATN n number Arctangent in radians
    n/a ATTR (x,y) two arguments A number whose binary form codes the attributes of line x, column y on the television.
    Bit 7 (most significant) is 1 for flashing, 0 = not fl. Bit 6 is 1 for bright, 0 for normal.
    Bits 5 to 3 are the paper colour. Bits 2 to 0 are the ink colour
    LDMath.Base2Decimal(n,2) BIN s series of 0&1 This is not really a function, but an alternative notation for numbers: BIN followed by a sequence of 0s and 1s is the number with such a representation in binary.
    Text.GetCharacter(n) CHR$ n number The character whose code is x, rounded to the nearest integer
    Text.GetCharacterCode(ch) CODE s string The code of the first character in x (or 0 if x is the empty string)
    Math.Cos(n) COS n number (in radians) Cosine x
    ldMath.Exp(n) EXP n number ex
    LDCall.Function(„ff”, n) FN s FN followed by a letter calls up a user-defined function (see DEF). The arguments must be enclosed in brackets; even if there are no arguments the brackets must still be present.
    LDCommPort.RXByte() IN n number The result of inputting at processor level from port x (0<=x<=FFFFh) (loads the bc register pair with x and does the assembly language instruction in a(c))
    kk=GraphicsWindow.LastKey INKEY$ none Reads the keyboard. The result is the character representing (in L or C mode) the key pressed if there is exactly one, else the empty string.
    Math.Floor(n) INT n number Integer part (always rounds down)
    Text.GetLength(ss) LEN s string Length
    Math.NaturalLog(n) LN n number Natural logarithm (to base e).
    not = ”false=true;true=false
    not[bl]
    LDBits.Not(n)
    NOT n number 0 if x<>0, 1 if x=0
    a Or b {bool}
    LDBits.OrBits(n1,n2)
    a OR b binary operation,
    both operands numbers
    a OR b =a if b=0, 1 if b<>0
    n/a PEEK number The value of the byte in memory whose address is x
    (rounded to the nearest integer)
    Math.PI PI none (3.14159265 . . . )
    GraphicsWindow.GetPixel(x,y) POINT Two arguments, x and y,
    both numbers; in brackets
    1 if the pixel at (x,y) is ink colour. 0 if it is paper colour.
    Math.GetRandomNumber(lmt)/lmt RND none The next pseudorandom number in a sequence generated by taking the powers of 75 modulo 65537, subtracting 1 and dividing by 65536. 0<=y< 1
    n/a SCREEN$ Two arguments, x and y,
    both numbers; in brackets
    The character that appears, either normally or inverted, on the television at line x, column y.
    Gives the empty string, if the character is not recognised.
    if n=0 then
    sgn=0
    else
    sgn=Math.Abs(n)/n
    Endif
    SGN n number Signum: the sign (-1 for negative, 0 for zero or +1 for positive) of x
    Math.Sin(n) SIN n number(in radians) Sine x
    Math.SquareRoot(n) SQR n number Square root.
    not req.in SB STR$ n number The string of characters that would be displayed if x were printed
    Math.Tan(n) TAN n number(in radians) Tangent
    n/a USR n number Calls the machine code subroutine whose starting address is x. On return, the result is the contents of the bc register pair
    n/a USR ss string The address of the bit pattern for the user-defined graphic corresponding to x.
    {not req.in SB} VAL s string Evaluates x (without its bounding quotes) as a numerical expression.
    LDMath.Evaluate2(ss) VAL$ ss string Evaluates x (without its bounding quotes) as a string expression.
     
    Sunday, August 23, 2020 6:36 AM
  • SB eqv. ZX cmd Descr.
    n=LDMusic.PlayNote(o,n,1)
    program.delay(x)
    ldmusic.endnote(n)
    BEEP x, y Sounds a note through the loudspeaker for x seconds at a pitch y semitones above middle C
    (or below if y is negative).
    simulated via colorcodes
    #ttrrggbb
    BRIGHT Sets brightness of characters subsequently printed. n=0 for normal, 1 for bright. 8 for transparent.
    yy=GraphicsWindow.Height-y
    GraphicsWindow.DrawEllipse
    (x-z, yy-z, z*2, z*2)
    CIRCLE x, y, z Draws an arc of a circle, centre (x,y), radius z
    GraphicsWindow.Clear()
    TextWindow.Clear()
    CLS (Clear Screen). Clears the display file
    cc=LDGraphicsWindow.Capture
    ("", "false")
    COPY Sends a copy of the top 22 lines of display to the printer, if attached; otherwise does nothing.
    dat=ldtext.split(„d1 d2 ...”, „ „) DATA a1 , a2 ... Part of the DATA list
    sub ff
    e=args[1]+args[2]+.../args[3]
    return=e
    endsub
    DEF FN a
    (a1 . . . ak )=e
    User-defined function definition; must be in a program. Each of a and a1 to ak is either a single letter or a single letter followed by '$' for string argument or result.
    File.DeleteFile(f) DELETE f Does not work without Microdrive, etc
    sh=GraphicsWindow.Height
    GraphicsWindow.DrawLine(ox, oy, x, sh-y)
    ox=x
    oy=sh-y
    DRAW x,y Draws a line from the current plot position moving x horizontally and y vertically
    File.DeleteFile() ERASE Does not work without Microdrive, etc.
    same FOR a=x TO y
    {STEP z}
    Deletes any simple variable a and sets up a control variable with value x, limit y, step z, and looping address referring to the statement after the FOR statement. Checks if the initial value is greater (if step>=0) or less (if step<0) than the limit, and if so then skips to statement NEXT a, giving error 1 if there is none. See NEXT.
    subb() GOSUB n Pushes the line number of the GOSUB statement onto a stack; then as GO TO n.
    lbl:
    goto lbl
    GO TO n Jumps to line n (or, if there is none, the first line after that)
    If x Then
    s
    Endif
    IF x THEN s If x true (non-zero) then s is executed. Note that s comprises all the statements to the end of the line.
    GraphicsWindow.PenColor=clr[n]
    GraphicsWindow.BrushColor=clr[n]
    TextWindow.ForegroundColor=clr[n]
    INK n Sets the ink (foreground) colour of characters subsequently printed. n is in the range 0 to 7 for a colour,
    n=8 for transparent or 9 for contrast.
    r=textwindow.read()
    r=fcdialogs.askfortextline(txt)
    INPUT The ' . . . ' is a sequence of INPUT items, separated as in a PRINT statement by commas, semicolons or apostrophes

    v=e
    LET v=e Assigns the value of e to the variable v. LET cannot be omitted. A simple variable is undefined until it is assigned to in a LET, READ or INPUT statement. If v is a subscripted string variable, or a sliced string variable (substring), then the assignment is Procrustean (fixed length): the string value of e is either truncated or filled out with spaces on the right, to make it the same length as the variable v
    File.ReadContents(f)
    ldFile.ReadANSIToArray(f)
    ldFile.ReadByteArray(f)
    LOAD f
    LOAD f DATA $()
    LOAD f DATA()
    Loads program and variables
    Loads character array $
    Loads a numeric array
    endfor NEXT a
    graphicsWindow.backgroundcolor=”clr
    TextWindow.backgroundcolor=”clr
    PAPER n Like INK, but controlling the paper (background) colour
    program.delay(p) {ms} PAUSE n Stops computing and displays the display file for n frames (at 50 frames per second or 60 frames per second in North America) or until a key is pressed. 0<=n<=65535, else error B. If n=0 then the pause is not timed, but lasts until a key is pressed.
    GraphicsWindow.SetPixel() PLOT c;m,n Prints an ink spot (subject to OVER and INVERSE) at the pixel (|m|, |n|); moves the PLOT position.
    File.WriteContents("pth" cnt) SAVE f
    SAVE f DATA()
    SAVE f DATA$()
    Saves the program and variables
    Saves the numeric array
    Saves the character array $
    textwindow.write(n)
    textwindow.writeline(n)
    graphicswindow.drawtext(x,y,txt)
    shapes.addtext(txt)
    PRINT The ' . . . ' is a sequence of PRINT items, separated by commas , , semicolons ; or apostrophes ' and they are written to the display file for output to the television.
    TextWindow.CursorLeft=n
    TextWindow.CursorTop=m
    AT m,n Outputs an AT control character followed by a byte for m (the line number) and a byte for n (the column number).
    t=text.getcharacter(9) TAB n Outputs a TAB control character followed by two bytes for n (less significant byte first), the TAB stop.
    arr[m]
    m=m+1
    READ vl , . . . vk Assigns to the variables using successive expressions in the DATA list.
    'cmnt REM . . . No effect. ' . . . ' can be any sequence of characters except ENTER. This can include : , so no statements are possible after the REM statement on the same line
    m=0
    m=n
    RESTORE
    RESTORE n
    RESTORE 0
    Restores the DATA pointer to the first DATA statement in a line with number at least n: the next READ statement will start reading there
    program.end() STOP Stops the program

    n/a BORDER m Sets the colour of the border of the screen and also the paper colour for the lower part of the screen.
    n/a CAT Does not work without Microdrive, etc
    n/a CLEAR Deletes all variables, freeing the space they occupied.Does RESTORE and CLS, resets the PLOT position to the bottom left-hand corner and clears the GO SUB stack
    n/a CLEAR n Like CLEAR. but if possible changes the system variable RAMTOP to n and puts the new GO SUB stack there
    n/a CONTINUE Continues the program, starting where it left off last time it stopped with report other than 0. If the report was 9 or L, then continues with the following statement (taking jumps into account); otherwise repeats the one where the error occurred.
    n/a DRAW x,y,z Draws a line from the current plot position moving x horizontally and y vertically relative to it while turning through an angle z.
    n/a FLASH Defines whether characters will be flashing or steady. n=0 for steady, n=l for flash, n=8 for no change.
    n/a FORMAT f Does not work without the Microdrive, etc
    n/a INVERSE n Controls inversion of characters subsequently printed.
    n/a LIST LIST 0
    n/a LIST n Lists the program to the upper part of the screen, starting at the first line whose number is at least n, and makes n the current line
    n/a LLIST LLIST 0
    n/a LLIST n Like LIST, but using the printer
    n/a LPRINT Like PRINT but using the printer
    n/a MERGE f Like LOAD f. but does not delete old program lines and variables except to make way for new ones with the same line number or name.
    n/a MOVE f1,f2 Does not work without the Microdrive, etc
    n/a NEW Starts the BASIC system off anew, deleting program and variables, and using the memory up to and including the byte whose address is in the system variable RAMBOT and preserves the system variables UDG, P RAMT, RASP and PIP
    n/a OUT m,n Outputs byte n at port m at the processor level. (Loads the bc register pair with m, the a register with n, and does the assembly language instruction: out (c),a.)
    n/a OVER n Controls overprinting for characters subsequently printed.
    n/a POKE m,n Writes the value n to the byte in store with address m.
    n/a RANDOMIZE RANDOMIZE 0
    n/a RANDOMIZE n Sets the system variable (called SEED) used to generate the next value of RND. If n<>0, SEED is given the value n; if n=0 then it is given the value of another system variable (called FRAMES) that counts the frames so far displayed on the television
    n/a RETURN Takes a reference to a statement off the GO SUB stack, and jumps to the line after it.
    n/a RUN RUN 0
    n/a RUN n CLEAR, and then GO TO n

    not req. CLOSE # Does not work without Microdrive, etc
    not req. DIM a( n1 , . . . ,nk ) Deletes any array with the name a, and sets up an array a of numbers with k dimensions n1 , ... ,nk. Initialises all the values to 0
    not req. DIM a$( n1 , ... ,nk ) Deletes any array or string with the name a$, and sets up an array of characters with k dimensions nl ,...,nk. Initialises all the values to " ". This can be considered as an array of strings of fixed length nk , with k-l dimensions nl,...,nk-l .
    not req. OPEN # Does not work without the Microdrive, etc
    not req. VERIFY The same as LOAD except that the data is not loaded into RAM, but compared against what is already there.
    Sunday, August 23, 2020 6:38 AM
  • added sb-online conv:

    (grayed cells equals to no avail.)

    SB TxtWin SB+LD SB Online ZX

    [dir] xxx CAT

    n/r xxx CLOSE#

    xxx xxx COPY

    [del] xxx ERASE

    xxx xxx FORMAT

    xxx xxx LOAD

    xxx xxx LPRINT (AT)
    xxx xxx LLIST

    xxx xxx MERGE

    [rename] xxx MOVE

    n/r xxx OPEN#

    xxx xxx SAVE

    LDCall.Function(„ff” xxx FN

    xxx xxx USR

    emm xxx BEEP

    xxx xxx IN

    kk=GraphicsWindow.LastKey kk=GraphicsWindow.LastKey INKEY$

    xxx xxx OUT

    xxx xxx CLEAR

    sub ff xxx DEF_FN

    n/r n/r DIM

    {same} {same} FOR TO STEP
    ss() ss() GO_SUB

    Goto lbl Goto lbl GO_TO

    If cc Then
    dd
    EndIf
    If cc Then
    dd
    EndIf
    IF THEN
    rr=TW.Read() xxx xxx INPUT (AT)
    n/r n/r LET

    xxx xxx LINE

    xxx xxx LIST

    EndFor EndFor NEXT

    Program.Delay( Program.Delay( PAUSE

    xxx xxx PEEK

    xxx xxx POKE

    emm emm READ

    ' ' REM

    xxx xxx RESTORE

    xxx xxx RETURN

    Program.End() Program.End() STOP

    xxx xxx CONTINUE

    xxx xxx NEW

    xxx xxx RUN

    Math.Abs( Math.Abs( ABS

    Math.ArcCos( Math.ArcCos( ACS

    Math.ArcSin( Math.ArcSin( ASN

    Math.ArcTan( Math.ArcTan( ATN

    LDMath.Base2Decimal( "" 2) xxx BIN

    Math.Cos( Math.Cos( COS

    LDMath.Exp( e=2.7182818
    Math.Power(e,
    EXP

    Math.Floor( Math.Floor( INT

    Math.NaturalLog( Math.NaturalLog( LN

    Math.Pi Math.Pi PI

    xxx xxx RANDOMIZE

    Math.GetRandomNumber( Math.GetRandomNumber( RND

    emm emm SGN

    Math.Sin( Math.Sin( SIN

    Math.SquareRoot( Math.SquareRoot( SQR

    Math.Tan( Math.Tan( TAN

    And And AND

    not=”false=true;true=false xxx NOT

    Or Or OR

    xxx xxx xxx ATTR

    xxx xxx xxx BORDER

    xxx emm emm BRIGHT

    xxx GW.DrawEllipse (
    GW.FillEllipse (
    Shapes.AddEllipse (
    GW.DrawEllipse (
    GW.FillEllipse (
    Shapes.AddEllipse (
    CIRCLE

    TW.Clear() GW.Clear() GW.Clear() CLS

    xxx GW.DrawLine ( GW.DrawLine ( DRAW

    xxx xxx xxx FLASH

    TW.ForegroundColor=” GW.PenColor =”
    GW.BrushColor =”
    GW.PenColor =”
    GW.BrushColor =”
    INK

    xxx emm emm INVERSE

    xxx n/r n/r OVER

    TW.BackgroundColor=” GW.BackgroundColor=” GW.BackgroundColor=” PAPER

    xxx GW.SetPixel( GW.SetPixel( PLOT

    xxx GW.GetPixel( xxx POINT

    TW.CursorLeft=x
    TW.CursorTop=y
    TW.Write(
    GW.DrawBoundText(
    GW.DrawText(
    s=Shapes.AddText(
    Shapes.Move(s,
    GW.DrawBoundText(
    GW.DrawText(
    s=Shapes.AddText(
    Shapes.Move(s,
    PRINT AT
    xxx xxx xxx SCREEN$

    TW.Write(Text.GetCharacter(9)) xxx xxx TAB

    Text.GetCharacter( Text.GetCharacter( CHR$

    Text.GetCharacterCode( Text.GetCharacterCode( CODE

    Text.GetLength( Text.GetLength( LEN

    n/r n/r STR$

    LDMath.Evaluate( xxx VAL

    LDMath.Evaluate2( xxx VAL$


    • Edited by Tryhest Monday, August 24, 2020 6:58 AM
    Monday, August 24, 2020 6:56 AM
  • sierp.squared triangle: VXL041

    Sunday, August 30, 2020 6:58 AM
  • same in invert colors: MQR233

    Sunday, August 30, 2020 8:52 AM
  • The same with the EV3 extension

    order  = 9
    GraphicsWindow.Width=512
    GraphicsWindow.Height=512
    GraphicsWindow.Title="Sierpinski Squared Triangle 
    GraphicsWindow.BackgroundColor="darkblue
    size  = math.Power( 2 order)
    For Y  = 0 To size
      For X  = 0 To size -1
        If Byte.AND_( X Y) >0  Then
        'If LDBits.AndBits( X Y) >0  Then
          GraphicsWindow.SetPixel( X ,Y LDColours.HSLtoRGB(y*y/(x+1) 1 .6))
        else
         GraphicsWindow.SetPixel( 511-X ,511-Y "darkblue")
        EndIf
      EndFor
    EndFor
    For Y  = 0 To size/2
      For X  = 0 To size -1
        If Byte.And_( X Y) =0  Then
        'If LDBits.AndBits( X Y) =0  Then
         GraphicsWindow.SetPixel( 511-X ,511-Y "darkblue")
        EndIf
      EndFor
    EndFor
    

    The differences probably come from the byte format

    We should always solve our tasks against a heavenly background 

    Sunday, August 30, 2020 9:30 PM
  • The school is beginning again))

    Let's do some drawing w divider: BDW948

    image used for divider:

    Monday, August 31, 2020 4:47 AM
  • divider drw2: KZQ034

    Monday, August 31, 2020 7:38 AM
  • divider drw3: KZQ034-1

     
    Monday, August 31, 2020 9:36 AM
  • small change:  KZQ034-2

    also:  KZQ034-3


    • Edited by Tryhest Monday, August 31, 2020 9:49 AM
    Monday, August 31, 2020 9:38 AM
  • updated music: XJB181

    • reduced to under 50 lines code
    • added effects and repeating

    Monday, August 31, 2020 1:00 PM
  • with school instruments: XJB181-0

    (requires LD extension)

    Monday, August 31, 2020 8:26 PM
  • hexa-star: LFP742

    Tuesday, September 1, 2020 4:17 AM
  • visual SB project: FKR444

    used images:

    Monday, September 7, 2020 4:04 PM
  • very nic tnq all members very god khoda ghovat 
    Monday, September 7, 2020 4:09 PM
  • additional icons for visualSB:

    icn5

    icn6

    icn4

    Tuesday, September 8, 2020 12:17 PM
  • update PXV930

    Tuesday, September 8, 2020 9:19 PM
  • added vs-bar: PXV930-1

    Wednesday, September 9, 2020 5:24 AM
  • added sb turtledemo: PXV930-2

    becomes in vSB:

    Wednesday, September 9, 2020 5:28 PM
  • added new icons: PXV930-3

    Wednesday, September 9, 2020 8:50 PM
  • biorythm graph:

    n0=math.floor(LDDateTime.NowOADate())
    bb=math.floor(LDDateTime.ToOADate("1/2/1990"))'<--------insert birth date=======================!!!'
    GraphicsWindow.Width=1200
    For f= 1 To 30
      nn=LDDateTime.ToOADate(text.Append (f "/09/2020"))
      ff=math.floor(nn-bb)
      TextWindow.WriteLine(f+" Days : "+ff)
      If math.floor(nn)=n0 Then
        TextWindow.WriteLine("==================")
      Endif
      TextWindow.WriteLine("Physical: "+math.Remainder( ff 23)+LDCall.Function4("sss" ff 23 f 1))
      TextWindow.WriteLine("Emotional:"+math.Remainder( ff 28)+LDCall.Function4("sss" ff 28 f 2))
      TextWindow.WriteLine("Mental:   "+math.Remainder( ff 33)+LDCall.Function4("sss" ff 33 f 3))
      TextWindow.WriteLine("-----")
    EndFor
    GraphicsWindow.Title="Biorythm for 09.2020."
    gg=LDGraph.AddGraph(1 1 1200 400 "Bio" "day" "val")
    LDGraph.ScaleAxisX(gg 1 1 31)
    LDGraph.AddSeriesHistogram(gg "Emo" mmm[2] "lime")
    
    LDGraph.AddSeriesLine(gg "Phy" mmm[1] "red")
    LDGraph.AddSeriesLine(gg "Men" mmm[3] "blue")
    
    args=0
    
    Sub sss
      mm=ldmath.sin(360*math.Remainder( args[1] args[2]) /(args[2]))*100
      return="  %="+LDMath.FixDecimal(mm 2)
      mmm[args[4]][args[3]]=LDMath.FixDecimal(mm 2)
    EndSub

    Thursday, September 10, 2020 12:32 PM
  • animated cycloides:

    For r=90 To 1080+90
      a[r-89][1]=LDMath.Cos(r)*20+111+r
      a[r-89][2]=LDMath.Sin(r)*20+110
    EndFor
    a[r-89][1]=LDMath.Cos(r)*20+111+r
    a[r-89][2]=LDMath.Sin(r)*20+120
    r=r+1
    a[r-89][1]=LDMath.Cos(90)*20+111+90
    a[r-89][2]=LDMath.Sin(90)*20+120
    GraphicsWindow.PenWidth=0
    GraphicsWindow.Title="Cycloides Anim"
    aa0=LDShapes.AddPolygon(a)
    LDShapes.BrushColour(aa0 "cyan")
    Shapes.Move(aa0, -201 0)
    aa=LDShapes.AddPolygon(a)
    LDShapes.BrushColour(aa "cyan")
    Shapes.Rotate(aa 180)
    Shapes.Move(aa 201 139)
    GraphicsWindow.BackgroundColor="teal"
    ldGraphicsWindow.Reposition(1 1, -250 0 0)
    
    While 1=1
      Shapes.Animate(aa, -170 139 2500)
      Program.Delay(2500)
      LDShapes.BrushColour(aa "blue")
      Program.Delay(1833)
      LDShapes.BrushColour(aa "cyan")
      Shapes.Animate(aa 190 139 2500)
      Program.Delay(2500)
      LDShapes.BrushColour(aa0 "blue")
      Program.Delay(1833)
      LDShapes.BrushColour(aa0 "cyan")
    EndWhile

    Friday, September 11, 2020 7:01 AM
  • added 6 languages translation code: WXM016

    Monday, September 14, 2020 5:58 PM
  • prog.languages comparation table: (1/3)

    Language Paradigm(s) Standardized Type strength Type safety Expression of types Type compatibility Type checking Parameter Passing Methods Available Garbage collection Intended use Design goals
    ACL2 functional Yes strong unsafe implicit dynamic immutable reference Yes Theorem proving Be logically sound, mimic Common Lisp
    ActionScript imperative, object-oriented,distributed ECMA strong safe static Yes Web design
    Ada concurrent, distributed, generic, imperative, object-oriented Yes strong safe explicit nominative static by value, by reference (compiler chosen if not determined by the data type) allowed, but not mandated Embedded, real-time, mission-critical, long-lived, and large scale systems Reliability and maintenance, Programming as a human activity, Efficiency Language Reference Manual
    ALGOL 68 concurrent, imperative GOST 27974-88 strong safe explicit structural static or dynamic (programmer chosen) by value or by reference (programmer chosen) Yes Application Completeness and clarity of design, Orthogonal design, Security, Efficiency (Static mode checking, Mode-independent parsing, Independent compilation, Loop optimization, Representations in minimal & larger character sets)
    ALGOL W imperative No strong safe explicit nominative static or dynamic (programmer chosen) by value, by reference or by name (programmer chosen) Yes Application, Education
    AmbientTalk concurrent strong safe explicit duck dynamic by value Mobile ad hoc networks
    AutoHotkey imperative No untyped by value or by reference No End User Programming simplicity, speed, stability
    AutoIt imperative by value or by reference General, scripting, GUI and tasks automation Simplicity
    BASIC procedural ANSI, ISO varies by dialect varies by dialect Education Simplicity
    C imperative ANSI C89, ISO C90/C99 weak unsafe explicit nominative static by value, by reference (through pointers) Optional through external tools System, Embedded Low level access, Minimal constraint
    C# imperative, object-oriented, generic, reflective, functional, event-driven ECMA, ISO strong safe
    (unsafe allowed)
    implicit nominative static, dynamic (for interop) by value, by reference (through managed pointers [explicitly in, out, or in-out]) Yes Application Rapid application development
    C++ imperative, object-oriented, generic ISO C++98/C++11 strong safe
    (unsafe allowed)
    explicit, partially implicit nominative, structural static, dynamic by value, by reference (through reference types) Optional through external tools Application, System Abstraction, Efficiency, Compatibility
    Chapel concurrent, generic, object-oriented, imperative, distributed, reflective no strong safe explicit, partially inferred nominative static by value, by reference No High Performance Computing Programmer productivity (compared to C/Fortran), performance
    Clean functional, generic No strong implicit static Yes General Correctness, Modularity
    Clojure functional, concurrent strong safe dynamic, static Yes
    COBOL imperative, object-oriented ANSI 68, 74, 85 (and subsequent revisions); ECMA; ISO 1989:2014 (and previous version in 1978, 1985, 2002) strong safe explicit static by value, by reference No Business and Financial Applications Readability
    ColdFusion procedural, object-oriented No weak implicit dynamic Web Development Rapid Application Development, Ease of use
    Common Lisp imperative, functional, object-oriented Yes strong safe dynamic, static Yes General Standardize Lisp
    D imperative, object-oriented, generic No strong safe explicit, optional inferred nominative, structural static, dynamic by value, by reference (through reference types) Yes Application, System Compilability, Correctness, Efficiency
    Dao object-oriented strong safe,
    unsafe allowed
    implicit, explicit static, dynamic Yes
    Dyalect imperative, object-oriented, functional No strong safe implicit duck dynamic by reference Yes Application Portable dynamic scripting language with consistent design and modern syntax
    Dylan imperative, object-oriented, functional, procedural strong safe static,
    dynamic
    Yes
    E imperative, object-oriented, object-capability, communicating event loops No strong (runtime) safe optional explicit duck dynamic by value Yes Secure collaboration, distributed systems, running untrusted applications, high-level "scripting" Familiarity to C/Java/JS users; less error-prone concurrency & security
    eC imperative, object-oriented, generic, reflective No weak unsafe explicit, partially implicit nominative, complex conversions system static,
    dynamic
    according to data type, or explicitly by value, by reference Reference counting Applications, GUIs, System, Games Elegance, Performance, Simplicity, Lightness, 99.9% C compatibility
    Eiffel imperative, object-oriented, generic Yes strong safe nominative static Yes Application Correctness, Efficiency, Design by contract
    Ela functional No strong safe implicit duck dynamic by reference Yes Application
    Elena object-oriented strong safe implicit dynamic Yes
    Elm functional, functional reactive programming, declarative, pattern matching No strong safe inferred, optional explicit annotations static immutable data structures, syntactically by value, time-varying with Signals Yes Web Development, GUIs, Applications, Games Simple, Modular, Safe, Reactive
    Erlang functional, concurrent, distributed, declarative - pattern matching, imperative No strong safe implicit dynamic immutable data structures, syntactically by value but safe sharing of compound data types Yes Telecom and mission critical distributed applications Fault tolerance, Reliability - Nonstop Running, Hot Code Change, Safety, Concurrency, Distribution, Scalability
    ERRE imperative, procedural No weak unsafe explicit static and dynamic by value Yes Education Readability, Modularity
    Factor stack-oriented No safe implicit duck dynamic by reference Yes x
    Forth imperative, stack-oriented ANSI, ISO/IEC 15145:1997 none n/a n/a n/a n/a No Applications, High reliability, Embedded systems, Booting new hardware. Compact implementations, Low level access, Interactive programming, CPU agnostic Assembler Alternative, ultra-small memory systems.


    • Edited by Tryhest Monday, September 14, 2020 7:31 PM
    Monday, September 14, 2020 7:29 PM
  • (part 2/3)

    Fortran imperative, procedural, object-oriented, (partially) generic, concurrent Yes strong safe explicit, partially implicit nominative static, dynamic by reference, or explicitly by value No Scientific and numeric applications Runtime efficiency, Simple syntax
    FutureBasic procedural No strong safe by value, by reference (through pointers) No Educational, Prototyping, Commerical Applications Readability, Simplicity, Compliability, Freeware, Efficiency
    Gambas object-oriented No strong safe explicit dynamic by value, by reference Application, Scripting Rapid application development, Visual Basic alternative
    Go concurrent No strong safe explicit, optionally inferred nominative; structural for interface types static by value Yes
    Gosu imperative, object-oriented, generic, functional Yes strong safe explicit, optionally inferred nominative and structural static by value Yes Application Open type system, optional dynamic loading
    Groovy imperative, object-oriented, aspect-oriented No strong safe implicit nominative dynamic Yes Application JVM compatibility
    Haskell functional, generic, lazy evaluation Haskell 2010 Report, Haskell 98 Report strong safe inferred, optional explicit annotations polymorphic structural static Yes Application, Research lazy evaluation, Teaching and research, completely formally described Report Preface
    Huginn imperative, object-oriented, functional No, language reference included with each version's documentation strong safe implicit dynamic by reference Reference counting Education, Application, Scripting, Interactive system shell Consistency, Simplicity, Readability, Expressiveness, Modularity
    icon procedural, structured, goal directed, string scanning, co-expressions No strong Safe implicit nominative dynamic by value and safe reference depending if the type is mutable or immutable Yes Text analysis, text editing, document formatting, artificial intelligence, expert systems, rapid prototyping, symbolic mathematics, text generation, and data laundry Facilitates ease of programming, short concise programs, automatic storage allocation and management, provide a rich base of basic data types and structures, and platform independence. Also see Unicon for the unified extended dialect of Icon.
    Io object-oriented, prototype No strong dynamic Yes
    J array programming, function-level programming, tacit No strong safe inferred structural dynamic by value, by name, by address for memory mapped files (and, indirectly, for foreign languages) Yes Data processing, expressing concepts algorithms and architectures Describe computers mathematically and concisely
    Java imperative, object-oriented, generic, reflective Java SE Specifications strong safe explicit nominative static by value Yes Application Write once run anywhere
    JavaScript imperative, object-oriented, functional, reflective ECMAScript standard weak implicit dynamic by value Yes Client side web scripting
    Joy functional, stack-oriented No strong safe dynamic functional research concatenative
    Kabap imperative, dynamic, extensible Yes weak unsafe implicit duck dynamic by value User scripting, general Safe sandboxed, easy to learn, easier to implement. Use to avoid eval() & reflection
    Keg imperative, concatenative No untyped unsafe implicit nominative dynamic by reference No Code Golf, general Be simple, readable, and concise
    Kotlin imperative, object-oriented,procedural, functional, generic, reflective No strong safe explicit, optionally inferred nominative static, dynamic (JS only) by value (read-only) Yes Application Pragmatic language for modern multi-platform applications with compilers for JVM, JS and Native code
    LDPL imperative No strong safe explicit static No Portable applications, readable source codes, teaching Readability
    LFE functional, concurrent, distributed, declarative - pattern matching, imperative No strong safe implicit dynamic immutable data structures, syntactically by value but safe sharing of compound data types Yes Telecom and distributed applications Fault tolerance, Reliability - Nonstop Running, Hot Code Change, Safety, Concurrency, Distribution, Scalability
    Lisp functional, reflective; others vary by dialect No strong dynamic Yes General Simple notation for Lambda calculus, Homoiconicity
    Logo procedural, functional No strong safe implicit structural dynamic Yes Education Simple syntax, Turtle graphics, Interactive programming
    Lua procedural, imperative, reflective No strong safe implicit dynamic Yes Host-driven Scripting Small, embedded, configuration.
    Lucid dataflow, functional No strong safe dynamic stream processing dataflow
    Luck imperative, functional No weak unsafe explicit, partially inferred nominative static by value or by reference Yes systems programming fast, C compatible, high-level language
    Mathematica functional, procedural No strong dynamic Yes Numeric and symbolic computation, visualization
    MATLAB procedural, imperative, array programming no strong unsafe dynamic by value Yes Numeric computation and visualization At the beginning designed as interpreter for easy use of fortran libraries, nowadays high performance numerical analysis and visualization
    MAXScript imperative, object-oriented, procedural No strong safe implicit dynamic by value, by reference 3D Art Tools, Scripting Simplicity, Accessibilty
    Modula-3 imperative, object-oriented, procedural, generic No strong safe
    (unsafe allowed)
    explicit structural static by value, by reference Yes Application, Systems Simple, Object oriented
    MUMPS procedural ISO/IEC 11756:1999 untyped not
    applicable
    by value, by reference Yes Built-in Persistent Storage
    Nial functional, array programming No strong dynamic Data processing
    Nim procedural, functional, generic No strong safe explicit nominative, structural static by value, by reference (through reference types) Yes General, Application, Systems, Games, Scripting, Web Efficient, Expressive, Elegant in that order.
    Oberon-2 procedural, imperative, object-oriented No strong safe explicit structural static by value, by reference Yes Teaching, System Simplicity
    Objeck object-oriented,functional No strong safe explicit nominative static by value Yes General, Education Minimalist, Cross-Platform, Modular
    Object Pascal
    (Delphi)
    imperative, object-oriented, generic No strong safe
    (unsafe allowed)
    explicit nominative static, dynamic by reference, by value some types Application, System Readability, Rapid application development, Modularity
    Objective-C imperative, object-oriented, reflective, generic (as of Xcode 7) No weak explicit static by value Yes (as of 2.0) Application Smalltalk like, Component based code reuse, C/C++ compatibility
    OCaml object-oriented, functional, imperative, generic no strong safe inferred, optional explicit annotations polymorphic structural static by value Yes Application Efficiency, Robustness, Correctness
    Oz logic programming, functional, imperative, object-oriented, concurrent No strong safe implicit structural dynamic by reference (though often immutable) Yes Application, Education, Distribution
    Monday, September 14, 2020 7:32 PM
  • part 3/3:

    PARI/GP imperative, procedural No weak unsafe implicit nominal dynamic by value, by reference Yes Mathematics, especially number theory
    Pascal imperative, procedural ISO 7185:1990 and ISO 10206:1991 strong safe explicit static (some dialects also dynamic) by reference, by value No General, Application, Education, System Readability, Discipline, Modularity
    Perl imperative, procedural, reflective, functional, object-oriented, generic No weak implicit dynamic, static by reference Reference counting Text processing, Scripting Terseness, Expressiveness
    Phix imperative, procedural No strong safe explicit, partially implicit duck dynamic, static copy on write, immutable reference, multiple returns Reference counting Application, General, High-level scripting, Text processing Simplicity, Readability, Facilitate ease of programming and maintenance
    PHP imperative, object-oriented, reflective No weak dynamic by value, by reference Yes Web Application, CLI Robustness and Simplicity
    Pike imperative, procedural, functional, object-oriented, reflective, event-driven No strong safe explicit structural dynamic, static by value, by reference Yes Application, scripting optimized execution, efficient networking
    Pop11 imperative, object-oriented, functional No strong safe implicit dynamic Yes Application, Education
    Prolog logic programming ISO strong dynamic Yes Problem solving, Artificial intelligence declarative
    Pure dynamic, functional strong structural dynamic Yes
    Python imperative, object-oriented, functional, aspect-oriented, reflective no strong safe implicit dynamic by value (Call by object reference) Yes Application, Education, Scripting Simplicity, Readability, Expressiveness, Modularity
    R functional, imperative, reflective, array No strong safe implicit Duck,
    structural
    dynamic value by need, by name (programmer chosen) Yes Statistics, Numerical computation, Visualization, Education Expressiveness, interactive manipulation and analysis of datasets
    Ra object-oriented No dynamic or static safe implicit or explicit dynamic or static Yes General Program in native language, clean and clear syntax, extensive standard library, convenience
    Racket functional, imperative, object-oriented, reflective No strong safe implicit or explicit (see Typed Racket) dynamic or static by value Yes General Extensibility, Simplicity, Modularity
    Raku
    (form. Perl 6)
    imperative, procedural, reflective, functional, object-oriented, generic, lazy evaluation, multiple dispatch, metaprogramming No. The Repository Of All Spec Tests (aka 'roast') defines the language strong safe,
    unsafe
    optional explicit nominal (duck and structural available via constraints, patterns, generics, and gradual typing) dynamic, static by value, by reference Yes Application, text processing, scripting Expressiveness, generality
    RapidQ imperative, component-oriented programming, event-driven No strong (none for Variant type) safe static by reference, by value Application Rapid application development, Simplicity, BASIC compatibility
    REXX
    (Classic)
    dynamic, procedural, functional Yes. strong safe inferred nominal dynamic (but only when both comparands are numeric and non─strict comparisons are used) by value garbage collection is allowed (and in most cases, automatic), but not mandated general, application, algorithms, scripting, host/sub─system scripting/interfacing, data/text processing, programming as a human activity designed to make programming easier; to foster high quality programs by making writing them as simple and enjoyable as possible; designing each part of the language for people to use is more important than providing easy implementation; follows the principle of least astonishment (POLA).
    Ruby imperative, object-oriented, functional, reflective JIS X 3017 (2011),
    ISO/IEC 30170 (2012)
    strong implicit dynamic by value (Call by object reference) Yes Application, Scripting Expressiveness, Readability
    Rust concurrent, functional, imperative, structured, generic No strong safe explicit, optionally inferred nominal static by value, by reference resource acquisition is initialization (RAII), optional reference counting Application, System Highly concurrent and highly safe systems
    Scala object-oriented, functional, generic The Scala Language Specification Version 2.9 strong safe partially implicit nominative, structural static by value, by name Yes General, Education, Parallel computing, DSL and scripting. Concise, Type-safe, Integrate OO and functional paradigms, Scalable and Elegance. Platform independent
    Scheme functional Yes, R5RS, R6RS strong safe implicit dynamic
    (latent)
    by value Yes General, Education Minimalistic, Lexical Scoping
    Seed7 extensible, object-oriented, imperative, structured, generic, reflective No strong safe explicit nominative static by value, by reference, by name Yes (no garbage collection process that stops the world) General, Application, System Extensibility, Portability, Reliability, Efficiency, Elegance
    Sidef object-oriented, imperative, reflective, dynamic, functional No weak unsafe optional explicit duck dynamic by value (Call by object reference), by reference Reference counting Application, Scripting, PL Research, Education Expressiveness, Elegance, Readability
    Skookum
    Script
    concurrent, object-oriented, functional, imperative, generic No, online syntax includes EBNF language specification strong safe inferred, optional explicit annotations nominal static by reference Reference counting Embedded gameplay, AI, automation, scripting Game concepts, Interactivity, Live workflow, Efficiency, Embedded
    Slate object-oriented, imperative, functional, reflective, prototype, multi-dispatch No strong safe implicit, optional structural (aka duck) dynamic by reference Yes Application, Embedded, Scripting Uniformity, Pure object-oriented, expressiveness, readability
    Smalltalk object-oriented, concurrent, event-driven, imperative, declarative ANSI strong safe implicit protocol (aka duck) dynamic by value (Call by object reference) Yes Application, Education Uniformity, Pure object oriented
    SPARK concurrent, imperative, object-oriented no strong safe explicit nominative static by value, by reference Allowed High integrity applications Logically sound, simple formal definition, expressive power, security, applications verifiable and have bounded space and time.
    Standard ML functional, imperative, generic SML '97 strong safe inferred, optional explicit annotations polymorphic structural static by value Yes
    Swift imperative, object-oriented, generic No strong inferred, optional explicit annotations nominative static by value Reference counting Application Compatibility with Objective-C runtime
    Tcl imperative, procedural, event-driven, object-oriented (native from Tcl 8.6 or via extensions before that) No weak safe implicit duck dynamic by value (also by name and by reference through passing of variable names and upvar command) Only of unnamed entities, e.g., values Embedded, Application, Scripting Extend, Embed and Integrate
    TMG declarative, data-driven, functional, unstructured No weak safe implicit by reference Compiler-compiler Creating compilers or translators (particularly, from a programming language to assembly)
    Trith functional, stack-oriented, concatenative No strong safe implicit duck dynamic by value Yes Embedded, Application, Scripting, Education Simplicity, Expressiveness, Terseness, Linked Data
    Unicon procedural, structured, goal directed, string scanning, co-expressions, object-oriented No strong Safe implicit nominative dynamic by value and safe reference depending if the type is mutable or immutable Yes Text analysis, text editing, document formatting, artificial intelligence, expert systems, rapid prototyping, symbolic mathematics, text generation, and data laundry. Facilitates ease of programming, short concise programs, automatic storage allocation and management, provide a rich base of basic data types and structures, and platform independence . Unicon provides additional capabilities over Icon integrating object oriented capabilities, messaging and external communications, event monitoring, and more in a consistent framework.
    V functional, stack-oriented, concatenative No strong safe dynamic functional research concatenative
    Visual Basic component-oriented programming, event-driven No strong safe nominative static by reference, by value (explicit) Yes Application Rapid application development, Simplicity
    Visual Basic .NET imperative, object-oriented, generic, reflective, functional, event-driven No strong safe implicit nominative static, dynamic (for interop) by value, by reference (through managed pointers [always in-out]) Yes Application Rapid application development
    Windows PowerShell imperative, object-oriented, functional, pipeline, reflective No strong safe implicit dynamic Scripting
    Wren imperative, object-oriented, functional, concurrent No strong safe implicit nominative dynamic by value Yes Host-driven Scripting Lightweight, class-based, concurrent, easily embeddable

    Monday, September 14, 2020 7:33 PM
  • Archimedean Spiral

    A=1.5
    B=0.7
    GraphicsWindow.PenWidth=4
    GraphicsWindow.Title="Archimedean Spiral"
    For T=37*math.PI to 0 Step -0.01
      R=A+B*T
      GraphicsWindow.PenColor=LDColours.HSLtoRGB(math.Remainder( hh 360) 1 .5)
      hh=hh+.8
      GraphicsWindow.DrawLine( R*math.COS (T)*5+320,R*math.SIN (T)*5+220 320 220)
    EndFor

    Tuesday, September 15, 2020 9:36 AM
  • sb online version:

    A=1.5
    B=0.7
    GraphicsWindow.PenWidth=4
    For T=11*math.PI to 0 Step -0.03
    R=A+B*T
    GraphicsWindow.PenColor=GraphicsWindow.GetColorFromRGB
    (math.Remainder(hh, 250),hh/5, 255-math.Remainder(hh/2,250))
    hh=hh+2
    GraphicsWindow.DrawLine(R*math.COS (T)*5+320,R*math.SIN (T)*5+220, 320, 220)

    EndFor


    • Edited by Tryhest Tuesday, September 15, 2020 9:59 AM
    Tuesday, September 15, 2020 9:57 AM
  • update of an old SB prog. from 2013: LWV159

    • reduced to 100 lns
    • color changed
    • speedup

    Tuesday, September 15, 2020 7:14 PM
  • adapted for sb Online:

    mainrds=120
    orbrds=50
    maindtstep=181
    orbdtstep=3
    maindt=0 
    orbdt=0
    curx=0 ' current x position'
    cury=0 ' current y position'
    showwindow()
    showcontrols()
    oldx=centerx
    oldy=centery+mainrds+orbrds
    Controls.ButtonClicked = buttondown
    
    While 1=1
      maindt=maindt+maindtstep
      If (maindt > 360) Then
        maindt=(maindt-360)
      EndIf
      If (maindt < 0) Then
        maindt=(maindt+360)
      EndIf
      orbdt=orbdt+orbdtstep
      If (orbdt>360) Then
        orbdt=orbdt-360
      EndIf
      If (orbdt<0) Then
        orbdt=orbdt+360
      EndIf
      orbx=centerx+mainrds * Math.Sin(maindt*(2*Math.Pi/360))
      orby=centery+mainrds * Math.Cos(maindt*(2*Math.Pi/360))
      curx=orbx+orbrds * Math.Sin(orbdt*(2*Math.Pi/360))
      cury=orby+orbrds * Math.Cos(orbdt*(2*Math.Pi/360))
      GraphicsWindow.DrawLine(curx,cury,oldx,oldy)
      oldx=curx
      oldy=cury
      GraphicsWindow.PenColor="red"
      ccc=ccc+3
      Program.Delay(3)
    EndWhile
    
    Sub showwindow
      GraphicsWindow.Clear()
      windowwidth = GraphicsWindow.Width 
      windowheight = GraphicsWindow.Height
      centerx = windowwidth/2
      centery = windowheight/2
      orbx=centerx
      orby=centery
      GraphicsWindow.PenWidth=0.7
      GraphicsWindow.PenColor=25
      GraphicsWindow.BackgroundColor = "darkblue"
    EndSub
    
    Sub showcontrols
      GraphicsWindow.BrushColor="black"
      mrtext= Controls.AddTextBox(1,1)
      Controls.SetSize(mrtext,40,20)
      ortext= Controls.AddTextBox(1,21)
      Controls.SetSize(ortext,40,20)
      mdtext= Controls.AddTextBox(1,41)
      Controls.SetSize(mdtext,40,20)
      odtext= Controls.AddTextBox(1,61)
      Controls.SetSize(odtext,40,20)
      gobutton=Controls.AddButton("Change",1,81)
      showbutton=Controls.AddButton("Clear",1,111)
      GraphicsWindow.BrushColor="lime"
      GraphicsWindow.DrawText(46,3,"Main rad.")
      GraphicsWindow.DrawText(46,43,"Main delta")
      GraphicsWindow.DrawText(46,63,"Orbit delta")
      GraphicsWindow.DrawText(46,23,"Orbit rad.")
      Controls.SetTextBoxText(mrtext,mainrds)
      Controls.SetTextBoxText(ortext,orbrds)
      Controls.SetTextBoxText(mdtext,maindtstep)
      Controls.SetTextBoxText(odtext,orbdtstep)
    EndSub
    
    Sub getvalues
      mainrds = Controls.GetTextBoxText(mrtext)
      orbrds = Controls.GetTextBoxText(ortext)
      maindtstep = Controls.GetTextBoxText(mdtext)
      orbdtstep = Controls.GetTextBoxText(odtext)
    EndSub
    
    Sub buttondown 
      operator = Controls.GetButtonCaption(Controls.LastClickedButton)
      If operator = "Change" Then
        getvalues()
      Else
        showwindow()
        showcontrols()
      EndIf
    EndSub
    

    Tuesday, September 15, 2020 7:21 PM
  • updt of naochan's game from 2015: XZX556

    used img:

    Tuesday, September 15, 2020 8:52 PM
  • updt of naochan's cross game: WMQ360

    Wednesday, September 16, 2020 6:40 AM
  • stars anim: HKZ472
    Wednesday, September 16, 2020 9:30 PM
  • benchmark test:  NNV710 and NNV710-1

    publish ur results for comparing

    for better results:

    • kill all unnecessary apps and tasks
    • don't move mouse
    • wait a bit to achieve max performance 

    Friday, September 18, 2020 6:54 AM
  • benchmark

    runs also on old online silverlight sb:

    Friday, September 18, 2020 7:26 AM
  • upgrade of gears: JNL719-1


    • Edited by Tryhest Sunday, September 20, 2020 6:03 AM
    Sunday, September 20, 2020 5:50 AM
  • m_x=500
    m_y=399
    args=0
    GraphicsWindow.Title="Superellipses"
    GraphicsWindow.Width=999
    GraphicsWindow.Height=777
    GraphicsWindow.BackgroundColor="green"
    
    For f= 0 To 5
      GraphicsWindow.penColor="yellow"
      LDCall.Function3("superellipse" 200+f*33 f*33+100 2.5-f/7)
      GraphicsWindow.penColor="lime"
      LDCall.Function3("superellipse" 100+f*33 f*33+200 2.5-f/7)
    EndFor
    
    
    Sub superellipse
      a=args[1]
      b=args[2]
      n=args[3]
      
      y[0] = b ' value for x = 0
      y[a] = 0 ' value for x = a
      
      ox=m_x
      oy= m_y - y[0] ' set starting point'
      
      For x = 1 To a-1
        y[x] = math.Floor( ldmath.Exp( math.Log(1 - math.Power(x / a  n)) / n ) * b )
        graphicswindow.drawline(ox oy (m_x + x), (m_y - y[x]))
        ox=m_x + x
        oy=m_y - y[x]
      EndFor
      
      For x = a To 0 Step -1
        graphicswindow.drawline(ox oy (m_x + x), (m_y + y[x]))
        ox=m_x + x
        oy=m_y + y[x]
      EndFor
      
      For x = 0 To a
        graphicswindow.drawline(ox oy (m_x - x), (m_y + y[x]))
        ox=m_x - x
        oy=m_y + y[x]
      EndFor
      
      For x = a To 0 Step -1
        graphicswindow.drawline(ox oy (m_x - x), (m_y - y[x]))
        ox=m_x - x
        oy=m_y - y[x]
      EndFor
      
    EndSub
    

    Monday, September 21, 2020 5:34 AM
  • lvl=18
    insize=320
    x=80
    y=70
    GraphicsWindow.Title="Color Dragon Curve"
    GraphicsWindow.BackgroundColor="darkblue"
    iters=math.Power( 2 lvl)
    qiter=256/iters
    sq=math.SquareRoot (2)
    qpi=math.PI/4
    rtt=0
    iter=0
    rq=1
    GraphicsWindow.PenWidth=.7
    s80()
    
    Sub s80 ' Dragon'
      If lvl<2 Then
        yn=math.SIN (rtt)*insize+y
        xn=math.COS (rtt)*insize+x
        GraphicsWindow.PenColor=LDColours.HSLtoRGB(ii 1 .55)
        ii=ii+.003
        GraphicsWindow.DrawLine( x+33,133+y 33+xn,133+yn)
        iter=iter+1
        x=xn
        y=yn
        
      else
        insize=insize/sq
        rtt=rtt+rq*qpi
        lvl=lvl-1
        r[lvl]=rq
        rq=1
        s80()
        
        rtt=rtt-r[lvl]*qpi*2
        rq=-1
        s80()
        
        rq=r[lvl]
        rtt=rtt+rq*qpi
        lvl=lvl+1
        insize=insize*sq
      EndIf
    EndSub

    Monday, September 21, 2020 4:32 PM
  • updt of nonki's cars: NTG405 

    • added 4 colors of cars
    • used images to overcome sb anim issues
    • for sb desktop+ld xtension use 

    Monday, September 21, 2020 7:57 PM
  • stars movement anim: RVS241

    click n drag mouse to adjust viewpoint

    Monday, September 21, 2020 8:26 PM
  • dragon recursion curve v2: CVX953

    Tuesday, September 22, 2020 2:26 AM
  • HSF633

    Tuesday, September 22, 2020 5:05 AM
  • small&simple memory game: JGF395

    Tuesday, September 22, 2020 4:58 PM
  • KMQ712

    Tuesday, September 22, 2020 5:59 PM
  • DNZ918

    used image:

    Tuesday, September 22, 2020 6:15 PM
  • easylang sb demo: KGN368

    Tuesday, September 22, 2020 8:19 PM
  • XJS345

    Wednesday, September 23, 2020 5:42 AM
  • XJS345-1

    Wednesday, September 23, 2020 6:01 AM
  • ZRB723

    Wednesday, September 23, 2020 1:26 PM
  • PWL520

    • click to set/unset cell
    • rightclick to run

    Wednesday, September 23, 2020 8:05 PM
  • QNL687

    Thursday, September 24, 2020 6:16 AM
  • nonki's cubic beizer for all sb versions (1.2 and above)

    java:

    online:

     
    Sub drr
      scale = 150
      DrawGrid()
      GraphicsWindow.BackgroundColor="#666677"
      size = 10  
      
      a = 1
      b = 0
      c = -1
      d = 0
      DrawCubic()
      Expression()
      GraphicsWindow.DrawText(40, 10, expr)
      
      x = -1
      y = 0
      DrawPoint()
      x1 = x
      y1 = y
      
      x = -1/3
      y = 4/3
      DrawPoint()
      x2 = x
      y2 = y
      
      x = 1/3
      y = -4/3
      DrawPoint()
      x3 = x
      y3 = y
      
      x = 1
      y = 0
      DrawPoint()
      x4 = x
      y4 = y
      
      AddPoints()
      GraphicsWindow.PenWidth = 2
      GraphicsWindow.PenColor = "DarkRed"
    EndSub
    drr()
    While "True"
      shL = ""
      nL = 0
      For k = 0 To 1 Step 0.05
        MovePoints()
        If 0 < k Then
          nL = nL + 1
          shL[nL] = Shapes.AddLine(gggx, gggy, gx, gy)
        EndIf
        gggx = gx
        gggy = gy
        Program.Delay(30)
      EndFor
      For i = 1 To nL
        Shapes.Remove(shL[i])
      EndFor
    EndWhile
    
    Sub AddPoints
      shT = Shapes.AddText("")
      Shapes.Move(shT, 40, 40)
      GraphicsWindow.PenWidth = 0
      GraphicsWindow.BrushColor = "DarkGreen"
      shP[1] = Shapes.AddEllipse(size, size)
      shP[2] = Shapes.AddEllipse(size, size)
      shP[3] = Shapes.AddEllipse(size, size)
      GraphicsWindow.BrushColor = "DarkOrange"
      shP[4] = Shapes.AddEllipse(size, size)
      shP[5] = Shapes.AddEllipse(size, size)
      GraphicsWindow.BrushColor = "DarkRed"
      shP[6] = Shapes.AddEllipse(size, size)
    EndSub
    
    Sub DrawCubic
      GraphicsWindow.PenColor = "#00CCCC"
      For x = x1 To x2 Step dx
          y = a * x * x * x + b * x * x + c * x + d
        Map()
        gx2 = gx
        gy2 = gy
        If x <> x1 Then
          GraphicsWindow.DrawLine(gx1, gy1, gx2, gy2)
        EndIf
        gx1 = gx2
        gy1 = gy2
      EndFor
    EndSub
    
    Sub DrawGrid
      gw = GraphicsWindow.Width
      gh = GraphicsWindow.Height
      gxo = gw / 2
      gyo = gh / 2
      fn = GraphicsWindow.FontName
      If (fn = "Tahoma") Or (fn = "Segoe UI") Then
        c10 = "#33009999"
        c100 = "#66009999"
        bc = "#00CCCC"
      Else    ' for SBO'
        c10 = "#00999933"
        c100 = "#00999966"
        bc = "#00CCCC"
      EndIf
      GraphicsWindow.FontName = "Courier New"
      GraphicsWindow.FontSize = 14
      GraphicsWindow.BrushColor = bc
      dx = 0.1
      dy = -0.1
      gx = Math.Remainder(gw / 2, dx * scale) - dx * scale
      gy = Math.Remainder(gh / 2, dy * scale)
      MapInv()
      x1 = x
      y1 = y
      gx = gw - Math.Remainder(gw / 2, dx * scale) + dx * scale
      gy = gh - Math.Remainder(gh / 2, dy * scale)
      MapInv()
      x2 = x
      y2 = y
      For x = x1 To x2 Step dx
        Map()
        rem = Math.Remainder(x, 1)
        If rem = 0.0 Then
          GraphicsWindow.PenColor = c100
          GraphicsWindow.DrawText(gx + 2, gh / 2, x)
        Else
          GraphicsWindow.PenColor = c10
        EndIf
        GraphicsWindow.DrawLine(gx, 0, gx, gh)
      EndFor
      For y = y1 To y2 Step dy
        Map()
        If Math.Remainder(y, 1) = 0.0 Then
          GraphicsWindow.PenColor = c100
          If x <> 0 Then
            GraphicsWindow.DrawText(gw / 2 + 2, gy, y)
          EndIf
        Else
          GraphicsWindow.PenColor = c10
        EndIf
        GraphicsWindow.DrawLine(0, gy, gw, gy)
      EndFor
    EndSub
    
    Sub DrawPoint
      GraphicsWindow.BrushColor = "Black"
      Map()
      GraphicsWindow.FillEllipse(gx - size / 2, gy - size / 2, size, size)
      ggx = Math.Floor(x * 1000) / 1000
      ggy = Math.Floor(y * 1000) / 1000
      GraphicsWindow.DrawText(gx, gy, "(" + ggx + ", " + ggy + ")")
    EndSub
    
    Sub Expression
      expr = "y ="
      plus = " "
      If a = 1 Then
        expr = expr + " x^3"
        plus = " + "
      ElseIf a = -1 Then
        expr = expr + " - x^3"
        plus = " + "
      ElseIf a <> 0 Then
        expr = expr + " " + a + " * x^3"
        plus = " + "
      EndIf
      If b = 1 Then
        expr = expr + plus + "x^2"
        plus = " + "
      ElseIf b = -1 Then
        expr = expr + " - x^2"
        plus = " + "
      ElseIf 0 < b Then
        expr = expr + plus + b + " * x^2"
        plus = " + "
      ElseIf b < 0 Then
        expr = expr + " - " + Math.Abs(b) + " * x^2"
        plus = " + "
      EndIf
      If c = 1 Then
        expr = expr + plus + "x"
        plus = " + "
      ElseIf c = -1 Then
        expr = expr + " - x"
        plus = " + "
      ElseIf 0 < c Then
        expr = expr + plus + c + " * x"
        plus = " + "
      ElseIf c < 0 Then
        expr = expr + " - " + Math.Abs(c) + " * x"
        plus = " + "
      EndIf
      If 0 < d Then
        expr = expr + plus + d
      ElseIf d < 0 Then
        expr = expr + " - " + Math.Abs(d)
      EndIf
      If (a = 0) And (b = 0) And (c = 0) And (d = 0) Then
        expr = expr + " 0"
      EndIf
    EndSub
    
    Sub Map
      gx = gxo + scale * x
      gy = gyo - scale * y
    EndSub
    
    Sub MapInv
      x = (gx - gxo) / scale
      y = -(gy - gyo) / scale
    EndSub
    
    Sub MovePoints
      Shapes.SetText(shT, "k = " + k)
      x12 = (1 - k) * x1 + k * x2
      y12 = (1 - k) * y1 + k * y2
      x = x12
      y = y12
      Map()
      Shapes.Move(shP[1], gx - size / 2, gy - size / 2)
      x23 = (1 - k) * x2 + k * x3
      y23 = (1 - k) * y2 + k * y3
      x = x23
      y = y23
      Map()
      Shapes.Move(shP[2], gx - size / 2, gy - size / 2)
      x34 = (1 - k) * x3 + k * x4
      y34 = (1 - k) * y3 + k * y4
      x = x34
      y = y34
      Map()
      Shapes.Move(shP[3], gx - size / 2, gy - size / 2)
      x13 = (1 - k) * x12 + k * x23
      y13 = (1 - k) * y12 + k * y23
      x = x13
      y = y13
      Map()
      Shapes.Move(shP[4], gx - size / 2, gy - size / 2)
      x24 = (1 - k) * x23 + k * x34
      y24 = (1 - k) * y23 + k * y34
      x = x24
      y = y24
      Map()
      Shapes.Move(shP[5], gx - size / 2, gy - size / 2)
      x = (1 - k) * x13 + k * x24
      y = (1 - k) * y13 + k * y24
      Map()
      Shapes.Move(shP[6], gx - size / 2, gy - size / 2)
    EndSub

    Thursday, September 24, 2020 12:36 PM
  • for sbdesktop+ld only update: CVF012-1

    Thursday, September 24, 2020 12:49 PM
  • QBV366

    Thursday, September 24, 2020 4:29 PM
  • 15 puzzle game: HSF365

    Thursday, September 24, 2020 6:59 PM
  • textmasking: PNH931

    • draw mask then switch to mix to see results
    • mask can be seen on separate page also

    Friday, September 25, 2020 6:58 AM
  • Hanoi's Tower Solver: BTP777-1


    Saturday, September 26, 2020 7:29 PM
  • LJB251-1

    22 hours 55 minutes ago
    • NRJ369

    12 hours 41 minutes ago
  • Nice IsoBoxes Animation !

    Please note:
    In countries with a comma as a decimal point, the subroutine has to be modified a little.

    Sub Sprite_ScalePoints
      points = ""
      For iPts = 1 To nPts
        _pt = LDText.Split(pts[iPts], ",")
        _pt[1] = _pt[1] / 100
        _pt[2] = _pt[2] / 100
        'TextWindow.WriteLine("_pt:" + _pt)
        points[iPts]="1=" + Math.Round(_pt[1] * s * 100) + ";2="  +  Math.Round(_pt[2] * s * 100)
        'points[iPts]="1="+ Math.Round(_pt[1] * s * 100) / 100+";2="+Math.Round(_pt[2] * s * 100) / 100
      EndFor
    EndSub

    Sandpile-Animation like  Star Trek Beaming

    11 hours 7 minutes ago
  • noofball game update: JNN273

    6 hours 6 minutes ago