I have a few things figured out now...just having trouble with these questions... ANY help you can provide is greatly appreciated. thanks liz
1) The statements: 100 VIEW (0,0) ? (100,100)
110 WINDOW (100,100) ? (150,150) would associate the physical coordinates (100,100) with the world coordinates ANSWER (150,100) - WHY??????
2) A viewport has been created whose corners are at 920,10), (16,10) (60,50) and (20,50). The statement that assigns the world coordinates (1,0) to the lower left corner and (10,100) to the upper right corners is ? ANSWER: WINDOW (1,0) ? (10,100)???
What is the difference between world and physical coordinates?
100 SCREEN 1,0 : CLS : KEY OFF : COLOR 1,0
120 DIM ARRAY .OF. PIXELS (114)
130 LINE (0,0) ? (40,40), 3, BF
140 GET (1,)) ? (40,40), ARRAY .OF. PIXELS
3) The instruction in line 130 will draw a A FILLED RECTANGLE 41 PIXELS WIDE AND 11 PIXELS HIGH ? WHY?????
4) The instruction in line 140 WILL STORE THE PIXELS OF THE RECTANGLE IN AN ARRAY ? WHY???
5) If the following lines were added: (TO ABOVE STATEMENT):
150 PUT (0,0), ARRAY OF PIXELS
160 PUT (10,10) ARRAY OF PIXELS
The program would MOVE THE SAME RECTANGLE DOWN AND TO THE RIGHT ? WHY??????
6) To draw a semicircle of radius 10 with coordinate (60,60) as the center, you would use the statements 110 CF = 2 * PI/360 ? ANSWER - 120 CIRCLE (60,60),10,CF*180,CF*360 WHY?
7) 20 CLS: KEY OFF
30 COLOR 1,0
40 LINE (20,20) ? (40,40) B
50 CIRCLE (30,30),1,3
60 PAINT (32,32),1,3
70 PAINT (22,22),2,3
Line 50 would draw a circle with a ANSWER: 5 PIXEL RADIUS INSIDE OF THE BOX ??
WHY IS THIS CIRCLE ONLY 5 PIXELS? WHERE DID THIS FIGURE COME FROM????
any help you can give me would be great. thanks liz
coupla more questions if you guys don't mind...... thanks
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
The viewable area is the world and the object may go beyond that area.
If the window area is smaller than the total object, portions will be out of view. Try expanding the view area to see more of an object.
Ted
If the window area is smaller than the total object, portions will be out of view. Try expanding the view area to see more of an object.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
Because the last parameter of the CIRCLE statement here is 3 which means a radius of 3 pixels starting from the middle pixel gives a diameter of 5 pixels.
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
As to the number of pixel counts, write the series 0 to 10. You can then count the numbers and you end up with 11.
In your mind, you try to subtract 0 from 10 and get 10. Always add 1 if you use subtraction first. Just like QB code (whatever that is) would do it.
boxpixels = (40 - 0) + 1 returns the actual number of pixels from 0 to 40.
Ted
In your mind, you try to subtract 0 from 10 and get 10. Always add 1 if you use subtraction first. Just like QB code (whatever that is) would do it.
boxpixels = (40 - 0) + 1 returns the actual number of pixels from 0 to 40.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0