BBC BASIC for Windows
« SOLVED!! 3D SPHERE DEPTH with SMOOTH Surface »

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



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: SOLVED!! 3D SPHERE DEPTH with SMOOTH Surface  (Read 187 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
xx SOLVED!! 3D SPHERE DEPTH with SMOOTH Surface
« Thread started on: Mar 7th, 2016, 7:55pm »

This took a bit of figuring. How would a person fill in the imperfections without using bigger pixels?
WELL I solved the issue and now its on to making RGB COLOR MIXER and the other 3D shapes from my tool box.

Although this is just a reinvention of something I already created and improved into a completely customizable tool in a different language, I feel I can bring a different element to the forum.

Code:
      
MODE 8 REM this is my current working window, but I need pixel thickness of 2
      OFF
      GCOL 1

      dimmer=0
      FOR x%=255 TO 0 STEP -1
        _dimmer =_dimmer+1
        COLOUR 1,_dimmer,_dimmer,_dimmer
        CIRCLEFILL 500,500,x%
        CIRCLE 500,500,x%
        REM FILL 500,500
      NEXT x%
      END
 

And here is THE SUN example

I am using RGB COLOR MIXER to get my colors
Code:
    
  MODE 8 REM this is my current working window, but I need pixel thickness of 2
      OFF
      _dr=0
      _h=0
      _v=0
      _r=0
      GCOL 1
      _h=RND(800)
      _r=RND(255)
      _v=RND(800)
      _dimmer=0
      FOR x%=250 TO 0 STEP -1
        _dimmer =_dimmer+2
        _r=_r-1
        _dr=_r-_dimmer
        IF _dr< 0 THEN _dr=0
        IF _dimmer> 250 THEN _dimmer=250
        IF _r<0 THEN _r=0
        COLOUR 1,_dimmer,_dimmer,0
        CIRCLEFILL _h,500,x%
        CIRCLE _h,500,x%
        REM FILL 500,500
      NEXT x%
      END
 

And here is the yellow sphere...
Notice its all about the dimmer variable and size of the object.
(the smaller the object, the larger the dimmer reduction must be)
(Maximum dimmer progression would be around 25 and that effects the size of your sphere about 200 max)

Code:
      MODE 8 REM this is my current working window, but I need pixel thickness of 2
      OFF
      _dr=0
      _h=0
      _v=0
      _r=0
      GCOL 1
      _h=RND(800)
      _r=RND(255)
      _v=RND(800)
      _dimmer=0
      FOR x%=250 TO 0 STEP -1
        _dimmer =_dimmer+1
        _r=_r-1
        _dr=_r-_dimmer
        IF _dr< 0 THEN _dr=0
        IF _dimmer> 250 THEN _dimmer=250
        IF _r<0 THEN _r=0
        COLOUR 1,_dimmer,_dimmer,0
        CIRCLEFILL _h,500,x%
        CIRCLE _h,500,x%
        REM FILL 500,500
      NEXT x%
      END



      LOG Last Edit: Today at 20:31:15

 
« Last Edit: Mar 7th, 2016, 8:39pm 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