[Tutor] ASCII-Art circles, was Re: Why are expressions not allowed as parameters in function definition statements?
boB Stepp
robertvstepp at gmail.com
Mon Jun 20 09:20:34 EDT 2016
On Mon, Jun 20, 2016 at 3:36 AM, Peter Otten <__peter__ at web.de> wrote:
> I'm now really sorry that I wrote that comment. It should have been
> something like
>
> # I know that the following code is inefficient and produces
> # underwhelming results. As its only purpose is to illustrate
> # the view part of MVC I won't spend one more minute on it.
Ah, Peter, you are a very bad boy! ~(:>)) At first I thought you had
deliberately inserted a subtle teaching point that I was supposed to
detect and correct. When I failed to find some subtlety of OOP or
MVC, I switched to looking at the actual display of the circle. So I
improved how it looked on my PC, but realized this was not a general
solution and left it there.
> Don't let that stop you if the problem of drawing graphics primitives
> interests you. You can reuse the coordinates of one point on the circle
> eight times, and for inner points no calculation should be necessary.
> I don't know how to best deal with an aspect ratio != 1; as the extra minute
> is more than over you have to google it yourself ;)
I think I have played with ASCII art enough for now. And your code
did give me (two) good examples demonstrating an implementation of
MVC, which was the main point of the thread. I am content (For a
moment at least!).
Thanks!
--
boB
More information about the Tutor
mailing list