BBC BASIC for Windows
« I made a 3D sphere but I need pixel thickness of 2 »

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



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: I made a 3D sphere but I need pixel thickness of 2  (Read 244 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
sad I made a 3D sphere but I need pixel thickness of 2
« Thread started on: Mar 7th, 2016, 6:05pm »

I am converting my emulated 3D tool box to BBC basic..
All I need is a pixel thickness of 2
The VDU statement at the top of the program should work
BUT
It gives me a tiny window that doesn't do what the examples tell me it should do. I copied the information on the base of my work so you can see I did it supposedly right.

Code:
      REM VDU 23,22,1024,768,2,2,16   REM why is this not working?
      MODE 8 REM this is my current working window, but I need pixel thickness of 2
      OFF
      GCOL 1

      dimmer=255
      FOR x%=0 TO 255
        _dimmer =_dimmer-1
        COLOUR 1,_dimmer,_dimmer,_dimmer    
        CIRCLE 500,500,x%   
        REM FILL 500,500
      NEXT x%
      REM VDU 23,22,width;height;charx,chary,ncols,charset


      REM width = window width in pixels (e.g. 640)
      REM height = window height in pixels (e.g. 512)
      REM charx = character width in pixels (e.g. 8)
      REM chary = character height in pixels (e.g. 16)
      REM ncols = number of colours (e.g. 16)
      REM charset = 0 for ANSI, 1 for OEM (IBM PC), 8 for UTF-
 
« Last Edit: Mar 7th, 2016, 7:58pm by michael » User IP Logged

I like making program generators and like reinventing the wheel
DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 321
sad Re: I made a 3D sphere but I need pixel thickness
« Reply #1 on: Mar 7th, 2016, 9:32pm »

Hi Michael,

Your version of VDU 23 doesn't work because you have used commas after width and height where you need to use semicolons, as seen in the example. If I recall correctly, the semicolons mean it gets passed to the routine as 16 bit values instead of 32 bits.

It might also be useful to know that you generally get 2 graphics units per pixel, for historical reasons. In other words, if you define a mode which is 600 x 400, there will be 1200 by 800 graphics units (in other words, a circle centred at 600,400 will be at the centre of the window, and if the radius is 400 it will reach the top and bottom (but not the sides)).

Best wishes,

D
User IP Logged

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