Method default argument whose type is the class not yet defined

M

Mark Lawrence

As Steve has just explained, the origin has nothing to do with the
orientation of the coordinate system.

But then I'm assuming you meant that 245 degrees was a bearing
relative to North. Was it supposed to be relative to my current angle?
Truthfully I wouldn't know what to do without asking the captain a
couple more questions.


Oscar

The only good acedemic is a dead acedemic?
 
R

Roy Smith

Oscar Benjamin said:
But then I'm assuming you meant that 245 degrees was a bearing
relative to North. Was it supposed to be relative to my current angle?
Truthfully I wouldn't know what to do without asking the captain a
couple more questions.

Granted, this requires some domain-specific knowledge, but an order to
"steer 245 degrees" means relative to north (and, technically, it's a
heading, not a bearing, but that's another discussion).

If the captain wanted you to change you heading relative to your current
heading, he would say something like, "turn left 10 degrees" (that may
not be strictly the correct wording).
 
M

Mark Lawrence

Vectors have a length ("full speed ahead") and a direction ("245
degrees"). What they don't have is a fixed location in space. The
captain didn't say, "Full speed ahead, steer 245 degrees, from 45.0N,
20.0W".

In other words, you are correct. The order, "full speed ahead, steer
245 degrees", doesn't give you the faintest idea of where you're going.
If you were the helmsman, after you executed that order, without any
additional information (such as your current location), you would have
no idea what piece of land you will hit, or when you will hit it, if you
maintain your current course and speed.

Thank you for your explanation.
 
O

Oscar Benjamin

The only good acedemic is a dead acedemic?

Is that what happens when people ask questions on your ship: "it's the
plank for him with the questions-askin'!"

I'm glad you're not my captain.


Oscar
 
S

Steven D'Aprano

On Mon, 12 Nov 2012 00:31:53 +0000, Oscar Benjamin wrote:

[...]
Wrong on all counts. Neither the length not the direction os a vector
are relative to any origin. When we choose to express a vector in
Cartesian components our representation assumes an orientation for the
axes of the coordinate system. Even in this sense, though, the origin
itself does not affect the components of the vector.


Draw a set of axes and mark the vector [1, 1]. Here's a crappy ASCII art
diagram, with X marking the head of the vector and a line drawn from the
origin to the head.

|
| X
| /
| /
|/
+------


Now draw a second set of axes with the origin set at the head of that
vector. For reference, I leave the previous axis in place. As before, X
represents the head of the vector.


| |
----X-----
| |
| |
| |
+---|--


Note that the "body" of the vector -- the line from the origin to the
head -- is gone. That's because the vector [1, 1] is transformed to the
vector [0, 0] under a translation of one unit in both the X and Y
directions. The magnitude of the vector under one coordinate system is 1,
under the second it is 0.

In a nutshell, you can't talk about either *distance* (magnitude) or
*direction* without an answer to "distance from where? direction relative
to what?".

I have spent a fair few hours in the past few weeks persuading teenaged
Engineering students to maintain a clear distinction between points,
vectors and lines. One of the ways that I distinguish vectors from
points is to say that a vector is like an arrow but its base has no
particular position. A point on the other hand is quite simply a
position. Given an origin (an arbitrarily chosen point) we can specify
another point using a "position vector": a vector from the origin to the
point in question.

Just because you have spent a lot of time and effort giving people advice
doesn't make it *good* advice.



[...]
Wrong. The point (0,0,0,...) in some ND space is an arbitrarily chosen
position. By this I don't mean to say that the sequence of coordinates
consisting of all zeros is arbitrary. The choice of the point *in the
real/hypothetical space* that is designated by the sequence of zero
coordinates is arbitrary.

So what? All you are saying is that there is more than one coordinate
system, and we can choose the one we like for any problem. Of course we
can, and that's a good thing.


I mean that it has the properties that zero has when used in addition
and multiplication:
http://en.wikipedia.org/wiki/0_(number)#Elementary_algebra

I see no reference to "additive and multiplicative zero" there. Did you
make up that terminology? The *identity* element is a common mathematical
term, but 1 is the multiplicative identity element.

What you are describing is generally known as the "absorbing element"
over multiplication: if X*a = X for any a, then X is an absorbing element
under multiplication.

http://en.wikipedia.org/wiki/Absorbing_element


And by the way, the vector [0, 0] (generalised to however many dimensions
you need) is not necessarily the only null (zero) vector. Some vector
spaces have many null vectors with non-zero components.

http://en.wikipedia.org/wiki/Zero_vector

but I digress.

The exact terminology doesn't really change anything, since everything
you say about vector [0,0] applies equally to the point (0,0) in the
Cartesian plane.



[...]
Is the text below a quote?
No.


The last point is bizarre. Complex multiplication makes no sense when
you're trying to think about vectors. Draw a 2D plot and convince
yourself that the square of the point (0, 1) is (-1, 0).

Um, yes? It's a rotation of the point (0, 1) by 90° counter-clockwise,
with a scale factor of 1. Does that confuse you? It's a straight-forward
geometric interpretation of multiplication in the complex plane.

http://www.clarku.edu/~djoyce/complex/mult.html

If you take the vector [0, 1] and rotate it by 90° counter-clockwise, you
get the vector [-1, 0].

Here it becomes clear that you have conflated "position vectors" with
vectors in general. Let me list some other examples of vectors that are
clearly not "from the origin to a point":

velocity
acceleration
force
electric field
angular momentum
wave vector

(I could go on)

But they are, all of them, without exception. E.g. velocity is relative
to some frame of reference, that is, which sets the "zero velocity"
relative to which all other velocities are measured. Electric fields are
relative to the vacuum far from any electric charges. And so on.

I quote:

"The angular momentum L of a particle about a given origin is defined as:

L = r × p

where r is the position vector of the particle relative to the origin, p
is the linear momentum of the particle, and × denotes the cross product."

http://en.wikipedia.org/wiki/Angular_momentum

Is there some part of "about a given origin" which needs additional
explanation?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,091
Messages
2,570,605
Members
47,225
Latest member
DarrinWhit

Latest Threads

Top