|
Matrix Rotation
Rotation of the plane at the origin by angle @ has the following form
x |--> R@x
where R@ is the matrix
( cos@ -sin@ )
( sin@ cos@ )
This is a 2 x 2 matrix on for a unit square (0,0), (0,1) , (1,0) and (1,1).
|
|
|
|
|
I need a solution to a tedious problem please. I need to find a suitable equation that will model the Gateway Arch in St. Louis using suitable axes. I can use what is known as a catenary which is y=a/2(e^(x/a)+e^(-x/a)). Can you help me? I am desperate!!!!
|
|
|
|
|
Jbones wrote: I need to find a suitable equation
Sounds like you have found it:
Jbones wrote: y=a/2(e^(x/a)+e^(-x/a))
What's the problem?
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
if you need to fit catenary parameters then use least squares.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Have you tried regression
|
|
|
|
|
maybe was for the OP...wasn't it?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
There was me talking about linear regression and trend lines
|
|
|
|
|
Frank Kerrigan wrote: Grady Booch: I told Google to their face...what you need is some serious adult supervision.
|
|
|
|
|
I hate to admit that you don't get the best advice here, but if you google "Gateway Arch in St. Louis equation" and take the first hit....
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
I'm interested in earth map programming .
For instance , on a rectangular projected earth map ,
its easy to place cities by lat & long ,
but harder to draw great & small earth circles
like sunlight perimeters .
Also for earth pictures taken from space :
? what is "map" projection
? math for lat&long points
? math for earth circles
Please recommend good sphere math book for this .
Thanks , Jim D
|
|
|
|
|
|
I disagree. Well, not completelly, but suficiently.
In a growing civilization we are bound to always find people ready to go beyond. Their number will never reach zero. And I propose that the ability to solve problems and imagine solutions to problems is increasing not because people are becoming smarter but, instead, because generation upon generation we are allowed to build where others left off.
My proposition is not a simple one. Even the definition of "smartness" (is this a word??) is hard to define in this context. We need not only traditional "smartness" but also large amounts of memory, speed of reasoning, ability to correlate the uncorrelated, and (depending on the area of interest) a close contact to physics and the real world or the largest possible distance from it. We also need to find science interesting, and very often we have to be "smart enough" to select the right topic to research on.
Anyway, my proposition implies that as science (including mathematics) becomes more complex, we will always find people that are able to understand it and expand it. This is simple, we just have to start where others left off and resist the temptation of understanding everything from scratch. Many are good at that. This makes me confident that science as an art is not destined to disapear.
However, science as an art is becoming less and less important in our society. Today I see a booming necessity for the pragmatics. I call them that because they are people who know enough to get things to work, have a very developed intuition about where to focus their attention, and an extremely important ability to take complex abstract results that others developed and strip them down to the point where it becomes practical to do something with them (this strip down is an expansion in knowledge, not a reduction).
Please note that what I meant is that science as an art will probably never disapear, but there will be a breed that will be ready to take control of the progress of our civilization by using scientific results and findings and expanding them to aplicability.
Anyway, even if you (or your source) were right, if science as an art disapeared that would simply mean that it had become useless and uninteresting to absolutely everyone. That has not happened yet to the disco sound, so what is the real possibility of science as an art becoming useless and uninteresting to absolutely everyone?
Rilhas
|
|
|
|
|
I don't think I confused anything... you meant continuous [number system] as oposed to discrete [number system], right? If so then I stand by my argument. I don't think it is destined to come to an end, and I don't say that only about mathematics but about science in general (I was just trying to make a "larger" point).
Discrete mathematics has its own dificulties, it just avoids the problem of the "infinitely small". Who will address those issues if not continuous mathematics? Will someone ever say "I've reached the infinitely small, and now I find it boring... I'll just stop ellaborating on it". I don't think so, unless we find that the universe is not continuous. That could make continuous mathematics come to a halt when it reaches "that minimum". Do you believe that?
Although the first few words of your post address the issue of continuity, all the remaining text addresses the issue of exagerated complexity as a "show stopper". Even the conclusion of the message sugests that it is meant to be applied to mathematics as a whole. Anyway, I thought you were posting your message as a means of exchanging ideas, and not of publicizing books (please take no ofense). So I think that this is where I confused your post, since I didn't realize that your post was confined to continuity (for me there is no real issue there).
Anyway, I'm not a mathematician, just a guy sharing his thoughts.
Rilhas
|
|
|
|
|
guys, is there a function in C++ that shifts the elements of an array? lets say that i have an array of 20 elemetns and i need to shift it by one element to the right, then the last element should become the first and the first one will be the second and so on.....am not sure if its called circular shift or rotation or something like that. sorry
if there is no function, then how would you go about it? you need to save memory and processing time on small controllers.. thanks!!!
|
|
|
|
|
Hi,
AFAIK there is no such function available in the standard libraries.
The operation should be called rotation.
A buffer that gets used from 0 till dim-1 then back to 0 etc is called a circular
buffer.
Are you sure you need to move the data around, a circular buffer is used for
many purposes (e.g. between a producer and a consumer, using a put and a get pointer);
circular buffers may be optimized by using a dimension that equals a power of two
(so you dont need to test for wrapping around, you simply mask away the overflowing
bit).
If you must move the data over an arbitrary shift amount, you could use an existing
copy function twice:
-once for the part that moves to the right, and once for the part that moves to
the left; since source and destination overlap, you would need a temp buffer for
one of the moves.
Moving over only one position only needs one memcpy or similar, and one temp variable.
|
|
|
|
|
std::rotate from <algorithm>.
Steve
|
|
|
|
|
If U want to save memory and processing time,U should not shift the entire array.
Instead U can have a variable say idxStart.It must be first set to ZERO.
If U want to shift to the right do like this:
idxStart=(--idxStart+arrayLength)%arrayLength;
While referring the array elements always refer like:
for(i=0;i<arrayLength;i++)
cout<<array[(i+idxstart)%arraylength];
hope, this="" will="" help="" u.
=""
=""
<div="" class="ForumSig">Regards,
Arun Kumar.A
|
|
|
|
|
// CommandLine.cpp : Defines the entry point for the console application.
//
#include "StdAfx.h"
#include <iostream>
#include <algorithm> // for 'std::rotate' and 'std::copy'
#include <iterator> // for 'ostream_iterator'
int main()
{
using namespace std;
int numbers[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
int *pOnePastEnd = numbers + sizeof(numbers)/sizeof(numbers[0]);
cout << "Before rotate:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
// Rotate left.
rotate(numbers, numbers+1, pOnePastEnd);
cout << "After rotate left:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
// Rotate right.
rotate(numbers, pOnePastEnd-1, pOnePastEnd);
cout << "After rotate right:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
return 0;
}
Steve
|
|
|
|
|
Thank you all for all the responses.. much appreciated..
I think i'll go with Arun's method of changing the index. Steve, i got a question.. how do i know about the functions in a library? dumb question, sorry! but not evrything is mentioned in the documentation. oh, yeah and thanks for the code...
|
|
|
|
|
I read a book on the STL. You could also look through the <algorithm> header file. C++ programmers should get acquainted with STL. I also recommend studying the Boost libraries.
Steve
|
|
|
|
|
will do.... thanks man. I've just started with C++. from engineering days, am used to matlab.. but i think its always good to add other languages too..
|
|
|
|
|
Sorry to butt in here, but I'd recommend the book "The C++ Standard Template Library: A Tutorial and Reference" by Josuttis for exactly that purpose. There are several chapters you can skim and get a good sense pretty quickly as to what's in the STL, without being bored to tears.
It also has lots of good examples and discussions and things like that. I've looked into a couple books in the past, trying to do exactly what you're talking about, and that one towers over the rest, IMHO. Excellent stuff.
|
|
|
|
|
There was a Project Meeting of the Star Wars Program (in the 80's) and the Project Manager stood up and said, I've got bad news about the Particle Beam Weapon. Our engineers calculate that the Particle Beam Weapon will require 10 to the 20th power watts, and we've only been able to supply 10 to the 10th power watts. So a member of the audience piped up, 'Hey great, we're half way there!'. Probably a lawyer.
|
|
|
|
|
I have devised an infinite series based on the Golden Ratio which converges to ln(x) (natural logarithm. Can somone check my work and comment? I would like to know its origin. Is there a friendly grad student in a math department at some university who would be interested? thanks, Joeinorange2@aol.com
Joe Sharp
|
|
|
|
|
Can you post it somewheres?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|