13-10-2016, 05:09 PM
If you transform from X,Y to R, theta a circle is simply R = radius for all values of theta. X = R*sin(theta) and Y = R* cos (theta) so you could make a circle this way. Doing sin/cos in digits is either a lookup table or CORDIC algorithm. In practice you usually work in the other direction, starting with X and Y since that's what raster scan gives you.
The simplest way to make a circle in a raster scan system is to make H and V parabolae. Most easily done with integrators (adder/accumulator). This is feasible in both analogue and digital - I've done both. There is a snag if you want to vary the size of the circle as the slope of the resulting 2 dimensional function isn't constant. So the softness and/or thickness of the circle will vary with size. Ideally you want a pythagorus function C = SQRT(X^2 +Y^2). Squaring is easy enough in digits, either with a multiplier or integrator as mentioned previously though you need to be careful with offsets. Square root is less easy. You need quite high precision to get a good small circle. The whole pythagorus function can be done with CORDIC though I've not tried this. In the analogue world I've designed circle generators with a pair of multipliers (MC1495) to do the squaring plus a feedback network that makes them effectively do pythagorus function. Amongst other things, I used them to do circular wipes on the Cox T series vision mixers.
I did the circle on the Courtyard CY460 SPG/test pattern generators with digital integrators in a FPGA and accepted the non-constant slope as there's no need for very small circles. There's a certain amount of fiddling around as the functions really need to be centred around the middle of line/frame while the timing system is geared to the start of line/frame.
The simplest way to make a circle in a raster scan system is to make H and V parabolae. Most easily done with integrators (adder/accumulator). This is feasible in both analogue and digital - I've done both. There is a snag if you want to vary the size of the circle as the slope of the resulting 2 dimensional function isn't constant. So the softness and/or thickness of the circle will vary with size. Ideally you want a pythagorus function C = SQRT(X^2 +Y^2). Squaring is easy enough in digits, either with a multiplier or integrator as mentioned previously though you need to be careful with offsets. Square root is less easy. You need quite high precision to get a good small circle. The whole pythagorus function can be done with CORDIC though I've not tried this. In the analogue world I've designed circle generators with a pair of multipliers (MC1495) to do the squaring plus a feedback network that makes them effectively do pythagorus function. Amongst other things, I used them to do circular wipes on the Cox T series vision mixers.
I did the circle on the Courtyard CY460 SPG/test pattern generators with digital integrators in a FPGA and accepted the non-constant slope as there's no need for very small circles. There's a certain amount of fiddling around as the functions really need to be centred around the middle of line/frame while the timing system is geared to the start of line/frame.
www.borinsky.co.uk Jeffrey Borinsky www.becg.tv