You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


Nano
06-08-2017, 01:09 PM (This post was last modified: 06-08-2017 02:38 PM by STxAxTIC.)
Post: #41
 (Print Post)
RE: Nano
Bplus - 

This project kicks lots of CENSORED. Thanks for setting the bar so high so that I don't waste any time trying to out-compete you in less than 100 lines of QB45 code. Your implementation language was well chosen, too - it would take hundreds of lines to simply get to the same starting place as you. Makes me think that if I enter this contest, I would have to jump right to Python or C++ to save myself the overheard.

I have not forgone my own personal entry into this contest yet, but I predict you'll be the winner if our judges have any neurological activity whatsoever.... AND if I don't join in :-)
Find all posts by this user
Like Post
06-08-2017, 02:51 PM
Post: #42
 (Print Post)
RE: Nano
Hi Mark --> bPlus

I see sb have built in command CHAIN which is something
like COMPILE NOW or COMPILE AS STRING...similar thing have o2 too.
So nano looks to me like nano-version of SB.
I still think that is cool because you create loops ,ifs etc
If i cach time i will made something with hand written eval
so no include ,currently iam bussy with other things .

basicPro forum:
http://basicpro.mipropia.com/smf/index.php
EU Radioboard forum:
http://euradioboard.createmybb3.com/index.php
AurelSoft main site:
http://aurelsoft.ucoz.com
Find all posts by this user
Like Post
06-08-2017, 03:05 PM (This post was last modified: 06-08-2017 03:13 PM by bplus.)
Post: #43
 (Print Post)
RE: Nano
Wink Yes, what is smaller than BASIC? SmallBASIC

What is smaller than SmallBASIC? Tinybasic

So what is smaller than Tinybasic? nano

Which according to STxAxTIC kicks a bunch of donkeys. Since that is animal cruelty I guess it was censored, or maybe because it's untrue, nano doesn't go around kicking animals, that's just not the right thing to do. Wink

B += _
Find all posts by this user
Like Post
06-08-2017, 03:50 PM (This post was last modified: 06-08-2017 04:09 PM by bplus.)
Post: #44
 (Print Post)
RE: Nano
A math problem is being discussed at another forum and I thought I'd try it on nano.

I made the mistake of first copying / translating the OP's code last night before checking the source of the problem, hee, hee I fell in the hole too, a run that never concludes. Yikes!

So then I check the source, OH! It's that kind of problem!

Since BSpiniza has posted his solution there, I can confirm my 2nd try with Nano confirms his.
Nice Avatar name BTW, Spinoza was brilliant but I wouldn't want to B him now!

EDIT: PS IGetGroovy was first to post correct answer (I assume it is correct Wink )

Code Snippet: [Select]
. dogs mice and bulls nano3.txt for Nano3.bas (B+=MGA) 2017-06-07
. problem discussed at QB Community Forum
. dog and 2 mice = 30
. mouse and 2 bulls = 20
. dog + mouse + bull = 39.51
. What is dog, mouse, bull?
.
. dog = 30 - 2 * mice
. bull = (20 - mice)/2 or 10 - .5*mice
. so 30 - 2 * mice + mice + 10 - .5 * mice = 39.51
. so -.49 = -1.5*mice
m = .49/1.5
d = 30-2* m
b = (20- m )/2
. dog = d , mice = m , bull = b
.
. check Sum
s = d + m + b
. Sum is s
BTW, I don't know why but I changed bears to bulls???

And the answer is: (well, close enough!)


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post
06-09-2017, 06:01 PM
Post: #45
 (Print Post)
RE: Nano
An experiment in drawing polygon fills with only the one graphic ra command. (BTW, I noticed I don't clear screen yet!)

ra review for nano

set x, y to start of ray
set a for angle
set r for distance
set p for QB pen color 0 - 15
OR set p <0 or > 15 to just move x, y (like turtle drawing)
call ray, ra
and x, y is updated to where the ray ended x = x + r * cos( a ), y = y + r * sin( a )

(make sure you leave a space on either side of lower case letter variable)

Code Snippet: [Select]
. polygon fill test nano3.txt for Nano3-2.bas (B+=MGA) 2017-06-08
. attempt to create a' reusable sub for drawing filled polygons
sub polygon 'n is number of points of poly 'l is limit to side
    b = 2*pi/ n
    o = 1
    c = 2*pi* o
    r = c / n
    do    
        i = 0
        a = 0
        do
            i = i + 1
            if i > n
                exit
            fi
            ra
            a = a + b
        loop
        o = o + .1
        c = 2*pi* o
        r = c / n
        if o > l /2
            exit
        fi
    loop
return
j = 0
do
    x = rnd*(xmax-50)+25
    y = rnd *(ymax-50)+25
    n = int(rnd*10)+3
    l = int(rnd*100)+10
    p = int(rnd*16)
    gosub polygon
    j = j + 1
    if j > 50
        exit
    fi
loop

After more than an hour drawing, with radius increases of .1 pixel it still leaves holes in the fill!


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post
06-11-2017, 07:05 AM (This post was last modified: 06-11-2017 07:31 AM by bplus.)
Post: #46
 (Print Post)
RE: Nano
Well Nano 3-2 pack that I posted last night is gone!

???

Here it is again without screen shots....


Attached File(s)
.zip  Nano3-2 pack.zip (Size: 11.13 KB / Downloads: 16)

B += _
Find all posts by this user
Like Post
The following 2 users Like bplus's post:
Aurel, figosdev
06-29-2017, 08:38 PM
Post: #47
 (Print Post)
RE: Nano
Oh man I was so distracted by having post deleted I forgot to mention latest feature in Nano 3-2.

2nd page / screen of Help see Misc 3-2:

Quote:
' 001 HELP nano3.txt (B+=MGA) 2017-06-10
' This is a read only file
' ============  GRAPHICS 3-1
' ra - set p = 0 to 15 for drawing that QB color, any other just moves x, y no line
'        set x = start ray x coordinate
'        set y = start ray y coordinate
'        set a = radian angle of direction to draw line 0 degrees is due East, pi/2 South
'        set r = distance in that direction
'        With all these set just call ra in program
'        x, y will updated such that
'        x = x + r * cos( a )
'        y = y + r * sin( a )
'        This allows turtle like drawing.
'
' ============  CONSOLE 3-2
' at x y     - sets next print ( . ) or ( ; )  or input ( ? ) at pixel x, y
' cls        - clear screen
' wait t     - delay action for t milli-seconds
'
' ============ MISC 3-2
' 2 equations in standard form:
' ax + by = c
' ex + dy = f
' solve command will load g with determinate ae-bd
' if g <> 0 then they intersect at (x, y) st.  x = (ce - bf)/g,  y = (af -cd)/g 
' if g = 0, they are either parallel or the same line so don't check x, y

You can solve for the intersection of two lines with it!
Code Snippet: [Select]
solve test nano3.txt (B+=MGA) 2017-06-10
put two line equations in standard form and find intersect if any
a = 1
b = 2
d = 4
e = 2
c = -7
f = 5
gosub determinate
c = 1
f = 3
gosub determinate
c = 4
f = -7
gosub determinate
a = 6
b = 3
c = 10
f = 15
gosub determinate
sub determinate
 .
 . These two lines with linear equations in Standard Form:
 . a X  +  b Y  =  c
 . d X  +  e Y  =  f
 .
 solve
 if g <> 0
  . intersect at (X, Y) = ( x , y ).
 else
  . are parallel or the same, Determinate = 0.
 fi
return


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post
06-29-2017, 09:51 PM (This post was last modified: 06-29-2017 09:56 PM by bplus.)
Post: #48
 (Print Post)
RE: Nano
Oh dang! Here is another sample and snapshot that was deleted:
Code Snippet: [Select]
at and cls test nano3.txt for Nano3.bas (B+=MGA) 2017-06-10
p = 14
do
 i = i + 1
 if i > 7
  exit
 fi
 j = 0
 x = xmax/2
 y = ymax/2
 at x y
 . j
 do
  j = j + 1
  if j > 15
   exit
  fi
  a = rnd*2*pi
  r = rnd*50 + 75
  ra
  at x y
  ; j 
 loop
 at 0 400
 wait 1500
 cls
loop

Nano 3-2 was really big post! getting a few needed functions in and the totally extra solving for the intersect of two lines (I had a couple lines left after last double parking session).


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post
06-29-2017, 10:07 PM
Post: #49
 (Print Post)
RE: Nano
you really did a good job with nano
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Pivot version two
QB64 Member Project - Basic Dithering
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Bowditch curve
QB64 Member Project - Isolation
QB64 Member Project - Blokus
QB64 Member Project - Swirl
QB64 Member Project - Input
QB64 Member Project - Kings Court
QB64 Member Project - Color Rotating Text
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Algeria Weather
QB64 Member Project - Rubix's Magic
QB64 Member Project - 9 Board
QB64 Member Project - Rotating Background
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Othello
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Line Thickness
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Dreamy Clock
QB64 Member Project - Pivet version one
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Point Blank
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - ARB Checkers
QB64 Member Project - Kings Valley verion one
QB64 Member Project - Touche
QB64 Member Project - Exit
QB64 Member Project - Domain
QB64 Member Project - Connect Four
QB64 Member Project - Sabotage
QB64 Member Project - Quarto
QB64 Member Project - Amazon
QB64 Member Project - Score 4
QB64 Member Project - Spiro Roses
QB64 Member Project - Splatter
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Qubic
QB64 Member Project - Dakapo
QB64 Member Project - Color Triangles
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Overboard
QB64 Member Project - Inside Moves
QB64 Member Project - Foursight
QB64 Member Project - OpenGL Triangles