BBC BASIC for Windows
« VDU graphics + thickness + 3D sphere TOOL+MOUSE »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: VDU graphics + thickness + 3D sphere TOOL+MOUSE  (Read 218 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
xx VDU graphics + thickness + 3D sphere TOOL+MOUSE
« Thread started on: Mar 7th, 2016, 11:56pm »

This took some digging
1) REM statements cant be placed after a VDU statement
2) VDU graphics screen statements apparently must be separate from the VDU line thickenss statement

FINALLY the conversion is accurate and functions much like the original 3D sphere tool I made on another platform

Issues seem to be fixed with borders.
HOLD LEFT MOUSE BUTTON DOWN AND DRAG MOUSE ACROSS SCREEN QUICKLY

The speed of the mouse draws with the level of image complexity does make me happy I am using BBC BASIC
Code:
     
 REM SET MODE TO 8 USING VDU
      VDU 22,8
      REM SET LINE THICKNESS TO 3
      VDU 23,23,3|
      OFF
      GCOL 1
      PROC_sphere(200,700,50,100,200,100,3)
      PROC_sphere(800,500,250,200,150,200,1)
      PROC_sphere(600,500,300,150,150,200,1)
      PROC_sphere(500,300,300,200,200,200,1)
      (mou)
      MOUSE x,y,b
      IF b=4 THEN PROC_sphere(x,y,50,100,200,100,3)
      GOTO (mou)
      END
      DEF PROC_sphere(H,V,SIZE,R,G,B,DI)
      r%=R
      g%=G
      b%=B
      size%=SIZE
      dimmer%=DI
      FOR x%=0 TO size%
        c%=50
        r%=r%-dimmer%
        g%=g%-dimmer%
        b%=b%-dimmer%
        IF r% <2 THEN r%=2
        IF g% <2 THEN g%=2
        IF b%<2 THEN b%=2
        IF r%<50 AND g%<50 AND b%<50 THEN GOTO (jump)
        COLOUR 1,r%,g%,b%
        CIRCLE H,V,x%
        (jump)
      NEXT x%
      ENDPROC
 
« Last Edit: Mar 8th, 2016, 01:09am by michael » User IP Logged

I like making program generators and like reinventing the wheel
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls