Comments (3)
there is a bug here in the Agon plot implementation, but it's not really what you're describing.
Acorn's VDU system has the concept of a "graphics cursor", but essentially, simplified, it just keeps track of the last point given in a drawing command.
to draw a circle you first need to move to a point at x,y coordinates which will be the centre of the circle, and you then need to use a circle plot command to a different x, y position. when the circle is draw, the graphics cursor should be left at that x,y position.
that is the behaviour you have been seeing in JSBeeb. the cursor is left where you told it to be positioned, i.e. the coordinates you gave to the circle PLOT command. that can actually be anywhere around the circumference of the circle, not just at a position of 45 degrees. rather than being "very dozy" I'd argue this behaviour is highly logical and easily understood.
the bug in the Agon plot implementation is that it is not updating the graphics cursor position after drawing the circle, so is leaving the graphics cursor at the centre of the circle. (in both cases the graphics cursor position is completely determinate.). this likely affects several other plot operations too. I will raise a pull request to fix this.
from agon-vdp.
Yes ... but it doesn't. That was the point. On the BBC Master, which has the GXR built in, it leaves it on the circle circumference. This is probably because they do an algorithm for 45 degrees on the circle ; you can do the rest with mirroring ; flipping ; rotating, and the line 1/2 way up to the top was the last horizontal filled line drawn and they just forgot to put it back. The design of circle is really illogical. Rectangle drawing works as one might expect , providing the coordinates of opposite corners, whereas for circle you provide the radius, which really should be a bounding box, which could be limited to circles and is extensible to ellipses.
from agon-vdp.
I ran up JSBeeb, selected BBC Master, drew some circles using the GXR command, and the cursor was always, consistently, left at the X,Y position used to plot the circle. every single time. it is categorically not restricted to be at a 45 degree angle
as an example, try:
MOVE 500,500
PLOT &95,700,500
PLOT 5,200,200
you will see a circle drawn, centred on 500,500, and then a line from the right hand edge of the circle, starting at 700,500, down to 200,200. that 700,500 point is most definitely not at 45 degrees to the centre of the circle - it's on the same line. change that 700,500 to anything you like and the circle will be drawn to intersect with that point, and the cursor left at the point given.
your interpretation of Acorn's circle drawing algorithm is simply incorrect.
their algorithm is for the user to specify the centre point, and then specify any point on the circumference of the circle. I'd say that's pretty logical, and easily understood. we're not going to adopt a different algorithm for the Agon.
the bug in the agon-vdp implementation, which has since been fixed, was that the Agon VDP wasn't moving the cursor after drawing the circle. the cursor was being left and the centre. when I fixed the bug I did so directly comparing the Agon VDP behaviour to the BBC Master GXR running on JSBeeb. the behaviour how matches. as an extra layer of verification, I also ran up an Archimedes emulator, and behaviour matches there too
Acorn's VDU system does also support drawing ellipses but that is not done using a "bounding box" approach. if I've understood what you're suggesting, that would not provide true ellipse support, but rather squashed circles, which are a different thing and not directly supported by Acorn's VDU system. for now we don't offer any ellipse support. if this ever gets added, we are more likely to support Acorn's style of ellipses than the simpler squashed circles
from agon-vdp.
Related Issues (20)
- Documentation for new screen modes added in VDP 1.03RC2 HOT 1
- Make vertical timing of 640x240 modes the same as 320x240 modes HOT 1
- VDU to get a keycode HOT 2
- Documentation for virtual keycodes
- [Feature request] a VDU command to change only a byte in a bitmap, and some other stuffs HOT 1
- vdu 25,80,x;y; do wrong triangles HOT 8
- PRINT TAB() should be relative to text viewport. HOT 1
- Feature Request: the ability to copy from screen/buffer to current bitmap HOT 3
- Help wanted - How to get audio status (audio command 1) ? HOT 5
- VDP crash on real Agon but not on the emulator sending bitmaps data HOT 2
- PLOT 69 does not set the current position. HOT 1
- Key up events rollover HOT 1
- Feature Request: class ProxyWaveformGenerator : public WaveformGenerator HOT 2
- [bug] Issue with equal/plus key on French keyboard HOT 2
- When using double-buffered modes, keyboard input is not visible HOT 3
- Feature request: Changing video modes should preserver colour scheme HOT 2
- Feature request: expose the selected FG/BG colours HOT 5
- Agon locks up when POS and/or VPOS is used with VDU 31 HOT 2
- Leave firmware to Steve.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agon-vdp.