POV-Ray : Newsgroups : povray.off-topic : Memories Server Time
30 Jul 2024 06:20:15 EDT (-0400)
  Memories (Message 71 to 80 of 94)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: Memories
Date: 22 Aug 2011 11:07:27
Message: <4e5270ae@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> On 8/20/2011 11:55, Warp wrote:
> >    So no, you don't get it "almost for free". Not if you want a high degree
> > of accuracy.

> Actually, I think you do, if you keep the slope of the line positive and 
> below 45-degrees. Then you use basic rotations of the algorithm to handle 
> other cases. The trick is the line will never go through more than 2 pixels 
> in the same column, so whatever doesn't go into the first pixel does go into 
> the second picture.

  If the line is anything else than 0 or 90 degrees, it can cover a
triangular area of a pixel, not just a trapezoidal one.

  Also, likewise, both edges of the line can go through the same pixel
(unless the width of the line is at least sqrt(2).)

  Symmetries do not help here at all.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Memories
Date: 22 Aug 2011 11:09:24
Message: <4e527124@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> You realise that all of the quantities involved are rational, right? And 
> that a rational number is just two integers?

  In practice the integers have a maximum value they can hold, so too much
precision in your rational value can easily overflow either (or both) of
the integers.

  (If you were to use integers of unbounded size, you might just as well
use floating point values. They would be faster too.)

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Memories
Date: 22 Aug 2011 11:28:17
Message: <4e527591$1@news.povray.org>
On 22/08/2011 04:09 PM, Warp wrote:
> Invisible<voi### [at] devnull>  wrote:
>> You realise that all of the quantities involved are rational, right? And
>> that a rational number is just two integers?
>
>    In practice the integers have a maximum value they can hold, so too much
> precision in your rational value can easily overflow either (or both) of
> the integers.

Yes. But if the quantities you're calculating with are pixel 
coordinates, overflow is highly unlikely to be a problem.


Post a reply to this message

From: Warp
Subject: Re: Memories
Date: 22 Aug 2011 11:53:18
Message: <4e527b6e@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> On 22/08/2011 04:09 PM, Warp wrote:
> > Invisible<voi### [at] devnull>  wrote:
> >> You realise that all of the quantities involved are rational, right? And
> >> that a rational number is just two integers?
> >
> >    In practice the integers have a maximum value they can hold, so too much
> > precision in your rational value can easily overflow either (or both) of
> > the integers.

> Yes. But if the quantities you're calculating with are pixel 
> coordinates, overflow is highly unlikely to be a problem.

  Except that we are talking about antialiasing here, which by definition
is calculating at subpixel accuracy.

-- 
                                                          - Warp


Post a reply to this message

From: andrel
Subject: Re: Memories
Date: 24 Aug 2011 15:21:46
Message: <4E554F49.5090800@gmail.com>
On 19-8-2011 17:44, Jim Henderson wrote:
> On Fri, 19 Aug 2011 16:32:22 +0100, Invisible wrote:
>
>>>> ...but it was somewhat baffling to walk into a classroom and discover
>>>> that I know more about the subject than the lecturer does.
>>
>>> Oh c'mon now!  Anyone who can think his way out of a wet paper bag has
>>> had this experience repeatedly. We're just socially trained not to say
>>> so.
>>
>> What, that the person being paid to teach you something knows less about
>> it than you already do?
>
> Yes, it's not that uncommon.  In my case, it was an assembly language
> class I took in college - it started from how to use MASM, but I'd
> already used TASM quite extensively - but the course was a required
> course in my degree program.

Mine were e.g. in computer graphics related subjects. We had one teacher 
that tried to keep ahead of the class by one week, but failed because of 
over consumption of C2H5OH. To this day he is also the only person I 
have ever met with a technical university degree that did not understand 
the equation for a straight line.
The practical part was more fun, but we had a japanese arts student to 
help us there...
The exam was a joke too, we could use our book and the questions were 
like 'give the definition of...', 'what two problems are there when 
using technique X'.
Aside: my main surprise in this was that the students from CS simply 
accepted this level of teaching, many did not even notice.


Post a reply to this message

From: Jim Henderson
Subject: Re: Memories
Date: 24 Aug 2011 15:51:22
Message: <4e55563a$1@news.povray.org>
On Wed, 24 Aug 2011 21:21:45 +0200, andrel wrote:

> Aside: my main surprise in this was that the students from CS simply
> accepted this level of teaching, many did not even notice.

That was something that surprised me as well - but then again, when I 
took my Assembly class, I had programmed in something like 15 different 
languages - more than anyone else in the class - and had been programming 
(even was paid to write code) since I was about 10.

So many CS students need that level of teaching, because they have 
(perhaps) math aptitude, but not (a lot of) hands-on experience writing 
code.

Jim


Post a reply to this message

From: andrel
Subject: Re: Memories
Date: 24 Aug 2011 16:39:30
Message: <4E556182.6040104@gmail.com>
On 24-8-2011 21:51, Jim Henderson wrote:
> On Wed, 24 Aug 2011 21:21:45 +0200, andrel wrote:
>
>> Aside: my main surprise in this was that the students from CS simply
>> accepted this level of teaching, many did not even notice.
>
> That was something that surprised me as well - but then again, when I
> took my Assembly class, I had programmed in something like 15 different
> languages - more than anyone else in the class - and had been programming
> (even was paid to write code) since I was about 10.
>
> So many CS students need that level of teaching, because they have
> (perhaps) math aptitude, but not (a lot of) hands-on experience writing
> code.

A low level would be acceptable for that reason. But a guy that writes a 
straight line and axes on the blackboard with a formula that does not 
match what he has drawn? Adding that there is a problem with either 
horizontal or vertical lines, because something might become infinitive 
and choosing the wrong one (matching neither his formula, nor his 
graph)? Or the assistant at the practical part that does not know the 
difference between a variable and a parameter?
Nobody needs that level of teaching.


-- 
Apparently you can afford your own dictator for less than 10 cents per 
citizen per day.


Post a reply to this message

From: Jim Henderson
Subject: Re: Memories
Date: 24 Aug 2011 19:45:02
Message: <4e558cfe$1@news.povray.org>
On Wed, 24 Aug 2011 22:39:30 +0200, andrel wrote:

> On 24-8-2011 21:51, Jim Henderson wrote:
>> On Wed, 24 Aug 2011 21:21:45 +0200, andrel wrote:
>>
>>> Aside: my main surprise in this was that the students from CS simply
>>> accepted this level of teaching, many did not even notice.
>>
>> That was something that surprised me as well - but then again, when I
>> took my Assembly class, I had programmed in something like 15 different
>> languages - more than anyone else in the class - and had been
>> programming (even was paid to write code) since I was about 10.
>>
>> So many CS students need that level of teaching, because they have
>> (perhaps) math aptitude, but not (a lot of) hands-on experience writing
>> code.
> 
> A low level would be acceptable for that reason. But a guy that writes a
> straight line and axes on the blackboard with a formula that does not
> match what he has drawn? Adding that there is a problem with either
> horizontal or vertical lines, because something might become infinitive
> and choosing the wrong one (matching neither his formula, nor his
> graph)? Or the assistant at the practical part that does not know the
> difference between a variable and a parameter? Nobody needs that level
> of teaching.

That's certainly true - what's being taught has to be taught effectively 
*and* correctly.

Jim


Post a reply to this message

From: Darren New
Subject: Re: Memories
Date: 25 Aug 2011 20:18:41
Message: <4e56e661$1@news.povray.org>
On 8/22/2011 8:07, Warp wrote:
>    Symmetries do not help here at all.

After further consideration, I think you're right, yes. :-)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

From: Darren New
Subject: Re: Memories
Date: 25 Aug 2011 20:20:39
Message: <4e56e6d7$1@news.povray.org>
On 8/22/2011 1:14, Invisible wrote:
> You realise that all of the quantities involved are rational, right?

Uh, no?  Sqrt(2) for a 45-degree line thru a pixel sort of thing?

> that a rational number is just two integers?

That would be the "fixed point" part of my comment. Of course, if you want 
high precision rationals, you might wind up with multi-word integers, at 
which point you might as well just use floating point unless you're back on 
8-bit hardware or something.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.