locked
small basic graphic and animations and more (4) RRS feed

All replies

  • train hills: PTP921

    • Edited by Tryhest Saturday, October 1, 2016 4:19 AM
    Saturday, October 1, 2016 4:19 AM
  • water pump: JQC251



    with pression measure:GPG512
    • Edited by Tryhest Saturday, October 1, 2016 11:55 AM
    Saturday, October 1, 2016 7:46 AM
  • added sea plant to nonki's aquarium: GDC167

    plant also follows mouse movements


    • Edited by Tryhest Monday, October 3, 2016 2:07 PM
    Monday, October 3, 2016 2:04 PM
  • draws object w unusual feature: KHQ023

    u can rotate UI completly!))

    • to draw object  rightclick start point and drag untill endpoint then release mouse
    • to move object just click to new position after selecting object
    • to rotate/zoom/pan UI use wheel and select one of last 3 options from wheel menu

    Tuesday, October 4, 2016 6:36 AM
  • rotating 3d molecule: XLM380

    Thursday, October 6, 2016 6:44 AM
  • 3d rotating bike: SZQ585


    • Edited by Tryhest Thursday, October 6, 2016 9:47 PM
    Thursday, October 6, 2016 1:23 PM
  • advanced version w light effects: RQS299
    Friday, October 7, 2016 8:26 AM
  • adjustable 3-cycle: RQS299-0

    use mswheel to adjust backwheels offset


    • Edited by Tryhest Saturday, October 8, 2016 5:41 AM
    Saturday, October 8, 2016 5:40 AM
  • This rotating molecule is
    incredibly well programmed, congratulations!
    Saturday, October 8, 2016 7:36 PM
    Answerer
  • tx yled))

    rotating 3d knot: VNH506


    • Edited by Tryhest Tuesday, October 11, 2016 4:27 AM
    Tuesday, October 11, 2016 4:26 AM
  • torus knot: FMR346

    Tuesday, October 11, 2016 4:44 AM
  • multicolor knot: BTW377

    Tuesday, October 11, 2016 4:58 AM
  • f8 knot: DDC802

    Tuesday, October 11, 2016 5:12 AM
  • @Tyhest

    Hi !, great tubes knots.  I have modified your Molecular modelling to see in a Space-filling model .

    program: XLM380-0

    Tuesday, October 11, 2016 2:29 PM
    Answerer
  • with red atoms and blue gray atoms

    program: XLM380-1

    Tuesday, October 11, 2016 3:21 PM
    Answerer
  • adjust rotation by checkboxes and mswheel: BTW377-0


    • Edited by Tryhest Tuesday, October 11, 2016 3:43 PM
    Tuesday, October 11, 2016 3:43 PM
  • ball mixing machine: VPQ569
    Sunday, October 16, 2016 9:00 AM
  • Ball Mixing Machina is a nice demo, but it needs a little correction:

    l=200
    graphicsWindow.PenWidth =0
    qq=shapes.AddRectangle (l 5)
    qq1=shapes.AddRectangle (5 40)
    GraphicsWindow.Width=600
    GraphicsWindow.Height =600
    GraphicsWindow.BackgroundColor ="black
    LDPhysics.AddFixedShape (qq 0 0) 
    LDPhysics.AddFixedShape (qq1 0 0)
    'LDPhysics.SetGravity (0 99)
    While "true"
      x=x+6/20
      'Shapes.Rotate (qq x+90)
      LDPhysics.SetPosition (qq 300+LDMath.cos(x-90)*l/2 300+LDMath.sin(x-90)*l/2 x+90)
      LDPhysics.SetPosition (qq1 300+LDMath.cos(x-90)*l 300+LDMath.sin(x-90)*l x+90)
      LDPhysics.DoTimestep ()
      Program.Delay (12)
      If Math.Remainder (x 3)=0 And cc<250 Then
        If ds then
          ds = "false
        else
          ds="true
          GraphicsWindow.BrushColor=LDColours.HSLtoRGB (cc,1,.5)
          ee=shapes.AddEllipse (20 20)
          cc=cc+1
          GraphicsWindow.Title =cc
          LDPhysics.AddMovingShape (ee 0 0 1)
          LDPhysics.SetBullet (ee)
          LDPhysics.SetPosition (ee 300 10 0)
        EndIf
      Else
        ds="false
      endif
    EndWhile 

    Sunday, October 16, 2016 11:11 AM
  • Hi backtothestart

    here is a little retouch of your program, with moon gravity simulation

    retouch or adds are in orange color.

    _______________________________________________________________________________________

    l=300
    GraphicsWindow.height=700
    GraphicsWindow.width=1366
    GraphicsWindow.top=0
    GraphicsWindow.left=0


    graphicsWindow.PenWidth =0
    qq=shapes.AddRectangle (l,5)
    qq1=shapes.AddRectangle (5,40)
    GraphicsWindow.BackgroundColor = GraphicsWindow.GetColorFromRGB( 0,0,70)

    LDPhysics.AddFixedShape (qq, 0, 0)
    LDPhysics.AddFixedShape (qq1, 0, 0)

    LDPhysics.Reset() 

    LDPhysics.SetGravity (1,16) ' moon gravity    100/6 = !!!

         

    While "true"
      x=x+6/20
      'Shapes.Rotate (qq x+90)
      LDPhysics.SetPosition (qq 300+LDMath.cos(x-90)*l/2 300+LDMath.sin(x-90)*l/2 x+90)
      LDPhysics.SetPosition (qq1 300+LDMath.cos(x-90)*l 300+LDMath.sin(x-90)*l x+90)
      LDPhysics.DoTimestep ()
      Program.Delay (12)
      If Math.Remainder (x, 3)=0 And cc<250 Then
        If ds then
          ds = "false
        else
          ds="true

    GraphicsWindow.BrushColor=LDColours.HSLtoRGB (Math.GetRandomNumber(360),1,0.5)


          ee=shapes.AddEllipse (20, 20)
          cc=cc+1
          GraphicsWindow.Title =cc
          LDPhysics.AddMovingShape (ee, 0, 0, 1)
          LDPhysics.SetBullet (ee)
          LDPhysics.SetPosition (ee, 300, 10, 0)
        EndIf
      Else
        ds="false
      endif
    EndWhile

    _________________________________________________________________________________________

    Sunday, October 16, 2016 2:55 PM
    Answerer
  • Now, same, but with random size bubbles, friction, density, restitution values modified.

    those lines has been modified:   

            v  =  Math.GetRandomNumber(60)

          ee  =  shapes.AddEllipse (v, v)               

    LDPhysics.AddMovingShape (ee, 1, 1, 2)

    cool effect !! i'll think i will add sounds to it.

    program:  QJB811



    • Edited by YLedEditor Sunday, October 16, 2016 3:11 PM
    Sunday, October 16, 2016 3:11 PM
    Answerer
  • @backtothestart

    here is an update to your program, with sky and moving shapes, with gravity value 8 .

    program:  CGL403

    Sunday, October 16, 2016 4:27 PM
    Answerer
  • nice examples))

    bouncing letters: SGD010
    • Edited by Tryhest Sunday, October 16, 2016 9:11 PM
    Sunday, October 16, 2016 9:10 PM
  • air tunnel: JFK299

    Monday, October 17, 2016 3:34 AM
  • hypar: NWZ234
    • Edited by Tryhest Monday, October 17, 2016 3:54 AM
    Monday, October 17, 2016 3:54 AM
  • bridge: JFK299-0

    • Edited by Tryhest Monday, October 17, 2016 5:44 AM
    Monday, October 17, 2016 5:44 AM
  • double bridge: BJW569

    Monday, October 17, 2016 5:56 AM
  • rolling earth on bridge: NKF819


    jaws: WDM538
    • Edited by Tryhest Tuesday, October 18, 2016 11:47 AM
    Monday, October 17, 2016 6:39 AM
  • crossroad w traffic lights: PQW719

    press space to start/stop rotating

    use mouse to pan wiew, wheel to zoom in/out

    Friday, October 21, 2016 5:03 AM
  • also an arduino traffic light simulation on this thread:

    https://social.msdn.microsoft.com/Forums/en-US/6fd2f515-ac9b-4499-a7a5-87418bc2419c/tinkering-arduino-and-small-basic?forum=smallbasic

    Saturday, October 22, 2016 5:43 PM
  • @tryhest

    cool, your traffic lights rotating, and flashing, marvelous programming as usual !!!

    Sunday, October 23, 2016 5:49 PM
    Answerer
  • ty yled))

    walking group animation demo: LKD848

    before run save down pic to local folder and reference to it at program beginning

    animation frames:

    Tuesday, October 25, 2016 4:07 AM
  • @tryhest

     hey hi ! very cool animation !!!

    so with LDimage.splitimage and with LDShapes.GetLeft associate with shapes,move, shapes.animate you

    ended with this marvelous walking animation, wow !!!  thanks for sharing this program, it will help other peoples like me who want to start doing  animation programming with Small Basic and with LitDev extension.


    • Edited by YLedEditor Tuesday, October 25, 2016 1:45 PM
    Tuesday, October 25, 2016 1:45 PM
    Answerer
  • @tryhest

    with your animation walking program i found this on wikipedia:

    Horse in motion

    Sallie Gardner at a Gallop is a series of photographs consisting of a galloping horse, the result of a photographic experiment  by Eadweard Muybridge on June 15, 1878

    so i try your animation technique with this horse, it works ! but in this case a still animate image.

    same method: download the horse 4 x 3 movements picture below in the correct program.directory SB folder.

    program: PTL771

    results:


    • Edited by YLedEditor Tuesday, October 25, 2016 2:38 PM
    Tuesday, October 25, 2016 2:37 PM
    Answerer
  • round walk by ld animation method: WJH915 
    Tuesday, October 25, 2016 4:29 PM
  • turtlelike walk: QMP561

    use arrowkeys to direct passenger 

    Tuesday, October 25, 2016 7:05 PM
  • updated version: CPC284

    (can be base of a game)

    Wednesday, October 26, 2016 2:50 AM
  • 3d engraver in motion v0.1: JJH926

    Wednesday, October 26, 2016 7:08 AM
  • v0.2 added tool and some printout: KXG505

    Wednesday, October 26, 2016 11:15 AM
  • fractal recursion ferns: RVZ973

    Friday, October 28, 2016 11:21 AM
  • tree: JPT045

    Friday, October 28, 2016 11:42 AM
  • @tryhest

    program doesn't seems to work: here is what i have when i run it:

    anyway :)

    that's beautiful !    fractal recursion ferns: RVZ973


    • Edited by YLedEditor Saturday, October 29, 2016 3:54 PM
    Saturday, October 29, 2016 3:48 PM
    Answerer
  • strange((

    i imported by code JPT045 and works ok

    • maybe u have old sb/ld version? try to update to latest ones v 1.2
    • i tested on w8.1 and w10 and works fine also
    • maybe u have not enough ram? try to eliminate unnecessary win tasks/apps running
    • maybe u have antivirus sw interferencing? try to stop ones
    • prog. uses recursion, sometimes it is memory expensive, i noted peaks of 35 mb ram/85% cpu usage

    • Edited by Tryhest Saturday, October 29, 2016 5:48 PM
    Saturday, October 29, 2016 5:40 PM
  • 3d tree rotating: JHL694

    Saturday, October 29, 2016 6:39 PM
  • @tryhest

    i have v1.2and latest LD extension update v 1.2.12

    w10

    i have a powerful computer.

    win defender in background

    still not working

    JPT045 not working , i no errors on the program statements, so it's ok, but i get this when i run it:

    i use 1366 x768 screen resolution.

    ______________ here is the program listing that i see when i import it ____________________________

    args=0
    p=0
    GraphicsWindow.title="Tree
    sub tree' :size
      p=p+1
      size[p]=args[1]
      if size[p] < 5 then
       
        dd=size
        tmov()
        dd=size
        tmov()
      else
        dd= size[p]/3
        tmov()
        tang=tang- 30
       
        ldcall.Function ("tree" size[p]*2/3 )
        p=p-1
        tang=tang+ 30
       
        dd=size[p]/6
        tmov()
        tang=tang+ 25
        ldcall.Function ("tree" size[p]/2)
        p=p-1
        tang=tang - 25
       
        dd= size[p]/3
        tmov()
        tang=tang+ 25
        ldcall.Function ("tree" size[p]/2 )
        p=p-1
        tang=tang - 25
       
        dd=size[p]/6
        tmov()
        dd=-size[p]
        tmov()
       
      EndIf
    EndSub
    GraphicsWindow.left=10
    GraphicsWindow.top=10
    GraphicsWindow.Width =1500
    GraphicsWindow.Height=800
    GraphicsWindow.BackgroundColor ="teal
    GraphicsWindow.PenWidth =1
    GraphicsWindow.PenColor ="lime
    tx=600
    ty=600
    tang=-20
    ldcall.Function ("tree"  330)
    tx=600
    ty=600
    tang=20
    ldcall.Function ("tree"  330)
    tx=600
    ty=600
    tang=40
    ldcall.Function ("tree"  300)

    Sub tmov
      mm=LDMath.Convert2Cartesian(tx ty dd tang-90)
      GraphicsWindow.DrawLine (tx ty mm[1] mm[2])
      tx=mm[1]
      ty=mm[2]
    EndSub

    _________________________________________________________________________________________

    and when i run it i get this

    Saturday, October 29, 2016 8:03 PM
    Answerer
  • rotating 3d star: BGL597

    press space to stop rotating around, any other key conts


    • Edited by Tryhest Sunday, October 30, 2016 4:31 AM
    Saturday, October 29, 2016 9:56 PM
  • very strange. at mine it works fine. try the 3d version JHL694
    Sunday, October 30, 2016 4:28 AM
  • nonki's maze in 3d issue: PNC833-21


    • Edited by Tryhest Sunday, October 30, 2016 5:18 AM
    Sunday, October 30, 2016 5:17 AM
  • packman updated: BFN681-12

    • resized 2x
    • all into shapes now
    • removed 270 lines , 12 kb less filesize!
    • corrected bug of lives display
    • added auto-tilting





    • Edited by Tryhest Sunday, October 30, 2016 7:08 AM
    Sunday, October 30, 2016 6:42 AM
  • @ Tryhest

    Pacman BFN681-12

    is working very well, i played i game.

    very strange. at mine it works fine. try the 3d version JHL694

    still run but do anything ???

    do we post a HELP on the forum to see if it do the samething on other user computer ?

    Sunday, October 30, 2016 1:48 PM
    Answerer
  • i tried on 2 different pc's and both works ok JPT045

    try to ask litdev or papalaub for advice maybe

    Sunday, October 30, 2016 8:43 PM
  • i tried on 2 different pc's and both works ok JPT045

    try to ask litdev or papalaub for advice maybe


    Runs fine for me, also 3D verson.
    Sunday, October 30, 2016 8:51 PM
    Moderator
  • PNC833-21

    ok work fine on my computer, i see 3D rotating pacman board !

    Sunday, October 30, 2016 9:09 PM
    Answerer
  • 3D rotating star BGL597

    perferct perfect, run wells on my lapop !

    great 3D animation :)

    @tryhest

    you have reach 1000 points , congratulations !!!!!!!!!


    • Edited by YLedEditor Sunday, October 30, 2016 9:17 PM
    Sunday, October 30, 2016 9:16 PM
    Answerer
  • ty yled))

    as u see it works also fine on my w10 tablet.

    so it's deffinitely on ur pc smthng strange((

    Monday, October 31, 2016 5:40 AM
  • new maze chompers game v2: NSX831

    • rotated UI  follows direction of move
    • animated fast rotation of maze
    • just use LEFT n RIGHT key to turn maze
    • enjoy!



    • Edited by Tryhest Monday, October 31, 2016 7:00 AM
    Monday, October 31, 2016 6:58 AM
  • @tryhest

    ok it works now, with the help of papa lapub and with new beta litdev

    here is a variation in colors for the tree:

    program no:  MSV074


    • Edited by YLedEditor Monday, October 31, 2016 9:07 PM new LD beta version
    Monday, October 31, 2016 8:34 PM
    Answerer
  • cool  yled, it looks like parsley))

    gravity maze:  CQP227




    • Edited by Tryhest Tuesday, November 1, 2016 6:46 PM
    Tuesday, November 1, 2016 7:21 AM
  • logo user manual in tree form: CFG250

    to create logo help file please import and append to one file:

    • QBT006
    • VTC612

    then save it and reference at prog. beginning



    • Edited by Tryhest Thursday, November 3, 2016 3:07 AM
    Thursday, November 3, 2016 3:01 AM
  • Great idea ! for others user manual
    Thursday, November 3, 2016 8:05 PM
    Answerer
  • sure. also for familytrees: PWL923

    sample tree text:

    ///familytree_1
    >>John Bull
    >>Xww~Mariah Sorvino
    
    -->>son Charles Bull
    ------>>wif~Sarrah Collins
    ------------g.son David Bull
    --------**
    ----**
    --**
    -->>dht~Cherry Bull Orbins
    ------>>hsb~Matthew Orbins
    ------------>>g.dht~Mia Bull Orbins
    ------------>>hsb~Tony Charles
    ---------------Gg.dht~Arleene Charles Bull Orbins
    ------------**
    --------**
    -----**
    ---**
    -**
    
    >>wif~Irma Moretty
    ---->>son Harry Bull
    ---------wif~Marla Davids Bull
    **
    **
    ---->>dht~Jill Bull 
    -------->>hsb~Jack Farrell
    ------------g.son Mike Farrell
    ------------g.dht~Jeanette Farrell

    Friday, November 4, 2016 7:56 AM
  • rotating minecraftlike 3d pyramid: WPQ978

    Saturday, November 5, 2016 6:43 AM
  • used images:

    Saturday, November 5, 2016 6:45 AM
  • inside view:


    • Edited by Tryhest Saturday, November 5, 2016 6:51 AM
    Saturday, November 5, 2016 6:49 AM
  • the pyramides of egypt site: TZQ371

     
    Saturday, November 5, 2016 7:57 AM
  • @ tryhest

    Hi ! great pyramids !  it gives me some ideas :)

    I tried a different perspective from a different point of view , like if it would be view from the ground, and with a sky color of Egypt and a desert sand nearest color.

    Except that I got this result, by resizing the size of the pyramids and moving it, I got the transparency of the sky in some of the pyramids.

    How do I fix this ? have an idea ? what's wrong in my coding?

    thanks :)

    program: TZQ371-0




    • Edited by YLedEditor Saturday, November 5, 2016 2:28 PM phrases and grammar and spelling reworked
    Saturday, November 5, 2016 2:22 PM
    Answerer
  • u have to floodfill the top of pyramid, it's the issue with floodfill cmd which fills only same color as pointed by command

    or u have to use shapes to draw triangles instead of line&floodfill cmds

    • Edited by Tryhest Saturday, November 5, 2016 4:21 PM
    Saturday, November 5, 2016 4:19 PM
  • results after using triangle cmd: TZQ371-1

    Saturday, November 5, 2016 5:30 PM
  • a task list for you yled:

    • make an animation of shadow running under pyramids in order with sun and time of day
    • steps to do: make shapes of pyramides with shapes.addtriangle
    • make shapes of shadows
    • calculate shadow triangles in order with sun daily motion
    • draw new shadows and remove old ones by shapes.remove cmd
    • in order to position correctly shadows use ldshapes.zorder
    • or u can alternatively use ldshapes.drawpolygon (a bit harder task)
    • or u can redraw shadows by drawing fillrectangle for sand (it doesnt affect pyramids as they are on shapes layer)

    enjoy!

    Saturday, November 5, 2016 5:39 PM
  • @tryhest

    Thanks for the valuable help that you give me, I learn a lot by browsing your page "graphic animations and more.." and all these programs, analyzing, dissecting them, to understand how the LD functions in particular.
    But I must say quite honestly that I am not made to your level of programming.
    That being said, the challenge that you offer me is fascinating, create a program to define a shadow produced by object, and to define the movement according to the time of day, and therefore the position of the Sun. So the shadow will have to change not only in direction, but also in length.
    You should submit this challenge for the month of December as part of the challenge of the month, as for example draw a sun dial and change the shade depending on the time.

    Following your proposal of tasks, I do not certain to achieve this, except that I'm going to try rather to draw a simple cube with a shadow, and then find out how the shadow moves in the opposite direction of the Sun.

    Saturday, November 5, 2016 7:54 PM
    Answerer
  • u could do it just by simulation of course))

    in meantime i did a real 3d rotating pyramids: WBG284

    Saturday, November 5, 2016 8:18 PM
  • also in 3d spiraltubes: HLR116

    Sunday, November 6, 2016 4:36 AM
  • A bit updated nonki's zodiac, by scaling down and rotating to earth's declination:

    (2 parts - too big to publish at once)

    • STP073
    • CWH208

    Sunday, November 6, 2016 5:06 AM
  • 3d rotating garden w trees and lake: SQB333


    used same pics as in previous posts above
    • Edited by Tryhest Sunday, November 6, 2016 9:14 PM
    Sunday, November 6, 2016 9:13 PM
  • w other pics

    Monday, November 7, 2016 12:29 AM
  • 3d bedroom VBQ274

    Tuesday, November 8, 2016 3:21 AM
  • 3d toilettetable: RNS835

    Tuesday, November 8, 2016 7:24 AM
  • kitchen table & chair: ZMG561

    Tuesday, November 8, 2016 7:50 AM
  • arduino 3dLEDcube simulation LZQ038

    • press space to start simul. leds
    • other key to stop and start rotating cube
    • mswheel to zoom in/ out

    http://randomnerdtutorials.com/arduino-led-cube-3x3x3/

    • Edited by Tryhest Wednesday, November 9, 2016 4:22 AM
    Wednesday, November 9, 2016 4:20 AM
  • 3d fireplace w laudry dryer: PTG938


    • Edited by Tryhest Wednesday, November 9, 2016 5:49 PM
    Wednesday, November 9, 2016 5:32 PM
  • @Tryhest

    cool  your cube simulation !

    i took your program , make some modifications, and ended with a Neptune rotating simulation !

    program: LZQ038-0

    Wednesday, November 9, 2016 5:54 PM
    Answerer
  • started developing of Newbasic: LZM428

    it will geneate sb output and also execute code

    current features:

    • automatic FOR var check/localisation
    • autoident
    • repeat command (missing in sb, thus is emulated by while)
    • deepness level checking
    • const replace
    • replace cmd - very usefull for shortening long cmds/freq. used constructions

    • Edited by Tryhest Thursday, November 10, 2016 8:15 AM
    Thursday, November 10, 2016 8:15 AM
  • fine, now add some moons orbiting around and Triton in opposite direction

    some hints:

    • use ldmath sin/cos to calc moon position by rot. angle (cos\sin(ang)*moon dist.radius)
    • use negative angle for triton pos.
    • use ld3dviev.translategeometry to  locate moon (beware pos is X Z Y, not X Y Z, assuming Z as elevation
    • use program.delay(15) between moon rotating
    • Edited by Tryhest Thursday, November 10, 2016 8:23 AM
    Thursday, November 10, 2016 8:17 AM
  • @tryhest

    that's a wonderful suggestion !

    thnks for the hint , i start doing it right now !!

    Thursday, November 10, 2016 1:54 PM
    Answerer
  • wow ! seem's it's gonna be shorter,

    i like the statement:    #bg / hue / sat / lg

    Thursday, November 10, 2016 2:04 PM
    Answerer
  • hi tryhest !!

    here is my first attempt to Draw Triton, what's missing ?

    program: no :  JZC858

    Thursday, November 10, 2016 3:40 PM
    Answerer
  • second step:

    triton orbit behind neptune , cool !

    triton et neptune resized more realistic

    but triton orbiting wrong side ?

    'program: DKN085

    Thursday, November 10, 2016 3:55 PM
    Answerer
  • now ok? DKN085-0
    Thursday, November 10, 2016 4:18 PM
  • Now with a stars background  ( spider nebula from Nasa Jpl images )

    program no: DNH320

    with colors and better image quality : flag for ld3dview set to ''false''

    program:XQV493


    • Edited by YLedEditor Thursday, November 10, 2016 4:58 PM
    Thursday, November 10, 2016 4:18 PM
    Answerer
  • updated nwbasic: JJT524

    try this code:

    #bg 210 70 30
    #gr 20 30 4 5 50 40|#fg (_x1+_y1)*10 100 50|`g`@frc
    nice output, when pasted to new sb window and run:

    Friday, November 11, 2016 5:11 AM
  • @tryhest

    How do i run the program ?

    here is where i am and can't go further...

    Friday, November 11, 2016 2:24 PM
    Answerer
    • press convert to sb button and
    • open a new sb window
    • paste code (code is yet in clipboard stored, as conversion ends)
    • and run as usually by play button

    • Edited by Tryhest Friday, November 11, 2016 3:56 PM
    Friday, November 11, 2016 2:29 PM
  • small code modificating produces dots:

    #bg 210 70 30
    #gr 20 30 4 5 50 50|#fg (_x1+_y1)*10 100 50|`g`@fel

    Friday, November 11, 2016 2:38 PM
  • some modification on sb code:

    'prog.list
    not="true=false;false=true"
    args=0
    GraphicsWindow.BackgroundColor= LDColours.HSLtoRGB (210, 0.7, 0.3)
    fx=1
    fy=1
    GraphicsWindow.PenWidth=0
    For _x1=0 to 15
      fx=Math.Power (.95 _x1+1)
      fy=fx
      For _y1=0 to 15
        GraphicsWindow.BrushColor= LDColours.HSLtoRGB ((_x1+_y1)*10, 1, 0.5)
        fx=fx*.95
        fy=fy*.95
        sh=shapes.addellipse( 50*fx, 50*fy)
        LDShapes.Centre (sh 20+50*_x1, 30+50*_y1)
      Endfor
    Endfor
    '*******Endprg.
    

    Friday, November 11, 2016 3:10 PM
  • new version 0.2: BGX678

    • new switch command
    • conditonal array (or array of conditions)

    sample: ( a bit encryptic)

    #bg 210 70 30 
    fx=1
    fy=1
    #gr 20 30 5 5 50 50|#fg (_x1+_y1)*10 100 50|%x .97|%y .97|#sw:`\_x1+_y1 4):1=`g`@fel;2=`g`@del;3=`g`@frc;4=`g`@drc

    output:

    sb transcription:

    'prog.list
    not="true=false;false=true
    args=0
    GraphicsWindow.BackgroundColor= LDColours.HSLtoRGB (210, 0.7, 0.3)
    fx=1
    fy=1
    For _x1=0 to 4
      For _y1=0 to 4
        GraphicsWindow.BrushColor= LDColours.HSLtoRGB ((_x1+_y1)*10, 1, 0.5)
        fx=fx*.97
        fy=fy*.97
        _cn=math.remainder (_x1+_y1 4)
        IF _cn=1 then
          graphicswindow.fillellipse(20+50*_x1, 30+50*_y1, 50*fx, 50*fy)
        elseIF _cn=2 then
          graphicswindow.drawellipse(20+50*_x1, 30+50*_y1, 50*fx, 50*fy)
        elseIF _cn=3 then
          graphicswindow.fillrectangle(20+50*_x1, 30+50*_y1, 50*fx, 50*fy)
        else
          graphicswindow.drawrectangle(20+50*_x1, 30+50*_y1, 50*fx, 50*fy)
        Endif
      Endfor
    Endfor
    '*******Endprg.


    note: sb version occupies 684 bytes while NB version does same with just 140 bytes! (more than 4x smaller)
    • Edited by Tryhest Friday, November 11, 2016 4:50 PM
    Friday, November 11, 2016 4:44 PM
  • @tryhest

    here is Planet X with 2 satellites in orbit.

    question: how can i make different speed for the 2 satellites, ? i did not find how !

    program:DQQ426


    • Edited by YLedEditor Friday, November 11, 2016 4:48 PM
    Friday, November 11, 2016 4:47 PM
    Answerer
  • @tryhest

    the reason was: i could not see this button because it was out of my resolution screen

    bt1=Controls.AddButton ("Convert to SB" 10 750)
    bt2=Controls.AddButton ("EXEC" 140 750)

    so i have to change some lines:

    GraphicsWindow.top=0
    GraphicsWindow.left=0
    GraphicsWindow.Width=1366
    GraphicsWindow.Height=768

    bt1=Controls.AddButton ("Convert to SB" 10 650)
    bt2=Controls.AddButton ("EXEC" 140 650)

    now i see thoses buttons:

    Friday, November 11, 2016 4:57 PM
    Answerer
  • @ tryhest

    ok program  but i have to change comma for dot ( in the LDColours.HSLtoRGB param) for my region

    so the final conversion of:

    ______________________________________________________________________________________

    #bg 210 70 30

    #gr 20 30 4 5 50 40|#fg (_x1+_y1)*10 100 50|`g`@frc

    is:

    ________________________________________________________________________________________

    'prog.list
    not="true=false;false=true
    args=0
    GraphicsWindow.BackgroundColor= LDColours.HSLtoRGB (210, 0.7, 0.3)
    For _x1=0 to 3
       For _y1=0 to 4
          GraphicsWindow.BrushColor= LDColours.HSLtoRGB ((_x1+_y1)*10, 1, 0.5)
          graphicswindow.fillrectangle(20+50*_x1, 30+40*_y1, 50, 40)
       Endfor
    Endfor
    '*******Endprg.

    __________________________________________________________________________________

    and final output give:


    • Edited by YLedEditor Friday, November 11, 2016 5:10 PM
    Friday, November 11, 2016 5:09 PM
    Answerer
  • u have to rotate each object, not camera.camera remains fixed, the code for cam rotation applies to each object. to achieve diff. rotation speed u just apply different angle increment(e.g. 0.5 vs 0.7 degrees) for each satellite
    Friday, November 11, 2016 6:10 PM
  • now added some stars drawing: MWL467

    #bg 210 70 30 
    `g`penwidth=0
    `g`@del 1 1 1 1)' to correct the ld bug
    #gr 20 30 5 5 50 50|#fg (_x1+_y1)*10 100 50|_sh1=\\`s`@** 3+`\ _x1+_y1 5) 5 22)


    • Edited by Tryhest Friday, November 11, 2016 7:12 PM
    Friday, November 11, 2016 7:10 PM
  • added 3d models: SRV288

    never been so easy to make 3d:

    #gw 0 0 800 800
    #bg 210 80 33
    @3d
    @ss3 3 30 `~

    draws a nice 3d sun))

    Saturday, November 12, 2016 5:08 AM
  • added 3d grids:  TFV321

    #gw 0 0 1200 900 3d-balls
    @3d
    #bg 210 88 44
    #gr 0 0 5 5 15 15|@ss3 2 33 `~|@mv3 o3d
    @cam 80 80 80`!)

    Sunday, November 13, 2016 4:20 AM
  • 3d rotating cubes: LXJ881


    • Edited by Tryhest Sunday, November 13, 2016 6:20 AM
    Sunday, November 13, 2016 6:19 AM
  • Simulation of a space ship that a certain high speed, approached from Planet X and see a crowd of asteroids and satellites crossed are way. There is even a giant cube that passes by.!

    Thanks to LD3DVIEW for this great experience of 3D animation.

    program no: FVX051

    Sunday, November 13, 2016 4:40 PM
    Answerer
  • wow super , like the rubik cube !
    Sunday, November 13, 2016 4:41 PM
    Answerer
  • now in wood mode: WKP716


    • Edited by Tryhest Sunday, November 13, 2016 8:09 PM
    Sunday, November 13, 2016 8:04 PM
  • 3d rotating skull: RGJ318

    Monday, November 14, 2016 2:39 AM
  • tube-art: NCQ874

     
    • Edited by Tryhest Monday, November 14, 2016 6:27 AM
    Monday, November 14, 2016 6:26 AM
  • @tryhest

    your wooden blocks has a great view aspect , really looks like real wood !

    Monday, November 14, 2016 4:23 PM
    Answerer
  • 3d surface lab: GND628

      • press space to start/stop rotating
      • up down moves node index
      • whell zooms/ ctrl+wheel pans z-axis

    Wednesday, November 16, 2016 11:58 PM
  • double skin solid: CDL946

    Thursday, November 17, 2016 4:57 AM
  • @ tryhest

    this page is now to long to load: small basic graphic and animations and more (4)                                

    try to start a new page :

    small basic graphic and animations and more (5)      :) 

                             

    Thursday, November 17, 2016 1:51 PM
    Answerer