One problem that could be very easily fixed is that there is no standard representation of a point or a vector. Whilst generally it's just a POD structure with x and y members, the name varies, and sometimes the
dimensions are referred to by index instead of by letter. You can also
have a philosophical discussion about whether points and vectors should
be the same structures or incompatible structures.
But a simple standardisation would mean the end of pointless editing of
code just to conform to whatever the host program has chosen.
On 22/01/2024 00:22, immibis wrote:
On 1/19/24 19:17, Malcolm McLean wrote:It should take a template, so any type can be used for the coefficients. Unless you have some weird and wonderful ideas, it will of course be
One problem that could be very easily fixed is that there is no
standard representation of a point or a vector. Whilst generally it's
just a POD structure with x and y members, the name varies, and
sometimes the dimensions are referred to by index instead of by
letter. You can also have a philosophical discussion about whether
points and vectors should be the same structures or incompatible
structures.
But a simple standardisation would mean the end of pointless editing
of code just to conform to whatever the host program has chosen.
And what should be the data type of the coefficients of the vector?
And what should? Why not also have matrices? What is the maximum
dimension supported? Are homogeneous coordinates a built-in feature?
No, leave the graphics stuff to a graphics team.
scalar.
I'd recommend a 2D with x and y and a 3D with x, y and z. Humanity is
not going to be elevated to a higher dimension any time soon. No
homogenous co-ordinates. No angle / magnitude notation. No need for
matrices because we already have a natural representation of the these,
since C++ supports 2 dimensional fixed size array.
Needing to store points in 2D or 3D space is a common requirement, and
code needs to communicate with other modules. One of which will be the graphics system, which may well have requirements beyond simple points
in space, but will include such a requirement.
On 22/01/2024 00:22, immibis wrote:
On 1/19/24 19:17, Malcolm McLean wrote:It should take a template, so any type can be used for the
One problem that could be very easily fixed is that there
is no standard representation of a point or a vector.
Whilst generally it's just a POD structure with x and y
members, the name varies, and sometimes the dimensions
are referred to by index instead of by letter. You can
also have a philosophical discussion about whether points
and vectors should be the same structures or incompatible
structures.
But a simple standardisation would mean the end of
pointless editing of code just to conform to whatever the
host program has chosen.
And what should be the data type of the coefficients of
the vector? And what should? Why not also have matrices?
What is the maximum dimension supported? Are homogeneous
coordinates a built-in feature? No, leave the graphics
stuff to a graphics team.
coefficients. Unless you have some weird and wonderful
ideas, it will of course be scalar.
I'd recommend a 2D with x and y and a 3D with x, y and z.
Humanity is not going to be elevated to a higher dimension
any time soon. No homogenous co-ordinates. No angle /
magnitude notation. No need for matrices because we already
have a natural representation of the these, since C++
supports 2 dimensional fixed size array.
Needing to store points in 2D or 3D space is a common
requirement, and code needs to communicate with other
modules. One of which will be the graphics system, which may
well have requirements beyond simple points in space, but
will include such a requirement.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 57:26:12 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,450 |
Posted today: | 1 |