How can I implement a function that calculate the coordinates of a point, in
3 dimensional space?
The function take 6 value (x, y, z, v(velocity), corner alfa, corner beta).
The prototype is this:
double coordinate(doub le x, double y, double z, double c, double alfa,
double beta);
How can I implement a function that return the corner alfa e beta? The
funcion take the coordinates of 2 point.
What is the prototypa of this function?
??????? corner(double x1, double y1, double z1, double x2, double y2, double
z2);
thanks. 8 2585
"Piotre Ugrumov" <au************ @tin.it> wrote... How can I implement a function that calculate the coordinates of a point,
in 3 dimensional space? The function take 6 value (x, y, z, v(velocity), corner alfa, corner
beta). The prototype is this:
double coordinate(doub le x, double y, double z, double c, double alfa, double beta);
How can I implement a function that return the corner alfa e beta? The funcion take the coordinates of 2 point. What is the prototypa of this function?
??????? corner(double x1, double y1, double z1, double x2, double y2,
double z2);
The usual way is to define some kind of data structure that holds
the necessary values and return an instance of it:
struct SphericalCoords {
double c, alpha, beta;
};
SphericalCoords corner( blah blah
Victor
Piotre Ugrumov wrote: How can I implement a function that calculate the coordinates of a point, in 3 dimensional space? The function take 6 value (x, y, z, v(velocity), corner alfa, corner beta). The prototype is this:
double coordinate(doub le x, double y, double z, double c, double alfa, double beta);
How can I implement a function that return the corner alfa e beta? The funcion take the coordinates of 2 point. What is the prototypa of this function?
??????? corner(double x1, double y1, double z1, double x2, double y2, double z2);
Far too little information to conclude what it is you want.
"Piotre Ugrumov" <au************ @tin.it> wrote in message
news:B2******** *************@n ews4.tin.it... How can I implement a function that calculate the coordinates of a point,
in 3 dimensional space? The function take 6 value (x, y, z, v(velocity), corner alfa, corner
beta). The prototype is this:
double coordinate(doub le x, double y, double z, double c, double alfa, double beta);
How can I implement a function that return the corner alfa e beta? The funcion take the coordinates of 2 point. What is the prototypa of this function?
??????? corner(double x1, double y1, double z1, double x2, double y2,
double z2);
thanks.
I dont know how to solve your problem as you havent said what half of your
variables are, however I do know that velocity in 3D space requires 3
values, much like position. Velocity is a vector, which has a direction so
therefore requires as many elements as there are dimensions.
HTH
Allan
Piotre Ugrumov wrote: How can I implement a function that calculate the coordinates of a point, in 3 dimensional space? The function take 6 value (x, y, z, v(velocity), corner alfa, corner beta). The prototype is this:
double coordinate(doub le x, double y, double z, double c, double alfa, double beta);
I don't understand what the alpha and beta values are for. A point in
Cartesian space only requires three dimensions, usually named x, y
and z.
Points don't have a velocity; points are a location. Objects have
a velocity and a location _at_a_given_tim e. Velocity, depending on
how you define it, may have a magnitude or a magnitude and direction.
One could say that an object has two components: location & time;
at time[i] it will be at location[j].
How can I implement a function that return the corner alfa e beta? The funcion take the coordinates of 2 point.
What is the relationship of a two dimensional "corner" and a
three dimensional point? You will need some kind of transformation
matrix to convert from 3 dimensions to 2. There will also be a loss
of information in the process.
For example, one could define a _projection_ of a 3 dimensional object
onto a 2 dimensional grid. This is how 3 dimension objects are
represented on a two dimensional screen or canvas.
What is the prototypa of this function?
??????? corner(double x1, double y1, double z1, double x2, double y2, double z2);
The prototype of a given function depends on what it needs and
what it produces. Once those items or types are known, creating the
prototype is easy. thanks.
Your post indicates that you need a better understanding of the
requirements.
--
Thomas Matthews
C++ newsgroup welcome message: http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq: http://www.raos.demon.uk/acllc-c++/faq.html
Other sites: http://www.josuttis.com -- C++ STL Library book
"Thomas Matthews" <Th************ *************** *@sbcglobal.net > wrote in
message Objects have a velocity and a location _at_a_given_tim e.
Just to throw a monkey wrench into the works here: according the the
Heisenberg Uncertainty Principle, one cannot know both an object's velocity
vector AND it's location exactly (at the same time). The more you know
about one, the less you know about the other. If you exactly locate an
object in space, you lose all information about its velocity vetor, and
vice-versa.
Probably not of any use here, since any simulation of movement of objects in
space is bound to explicitly calculate (set) both values. Just thought I'd
cause trouble. :-)
-Howard
Howard wrote: "Thomas Matthews" <Th************ *************** *@sbcglobal.net > wrote in message
Objects have a velocity and a location _at_a_given_tim e.
Just to throw a monkey wrench into the works here: according the the Heisenberg Uncertainty Principle, one cannot know both an object's velocity vector AND it's location exactly (at the same time). The more you know about one, the less you know about the other. If you exactly locate an object in space, you lose all information about its velocity vetor, and vice-versa.
You're almost right. The uncertainty in position is inversely
proportional to the uncertainty in momentum, not velocity. The OP's
class admittedly knows nothing about mass. ;)
Probably not of any use here, since any simulation of movement of objects in space is bound to explicitly calculate (set) both values. Just thought I'd cause trouble. :-)
Are you the one who keeps posting that "which is better" kindling? An
awful lot of C vs. C++, C# vs. Java, Windows vs. Unix stuff seems to
have cropped up lately. :(
"Jeff Schwab" <je******@comca st.net> wrote in message
news:-sednYJwv5n-J5DdRVn- Are you the one who keeps posting that "which is better" kindling? An awful lot of C vs. C++, C# vs. Java, Windows vs. Unix stuff seems to have cropped up lately. :(
No, I hate that crap as much you obviously do. :-)
-Howard
"Piotre Ugrumov" <au************ @tin.it> wrote in message
news:B2******** *************@n ews4.tin.it... How can I implement a function that calculate the coordinates of a point,
in 3 dimensional space? The function take 6 value (x, y, z, v(velocity), corner alfa, corner
beta). The prototype is this:
double coordinate(doub le x, double y, double z, double c, double alfa, double beta);
How can I implement a function that return the corner alfa e beta? The funcion take the coordinates of 2 point. What is the prototypa of this function?
??????? corner(double x1, double y1, double z1, double x2, double y2,
double z2);
thanks.
Perhaps it's an object moving within an object(say a point moving around
inside a cube) then with that..
as the point nears the centre of the cube it slows down thus simulating some
kind of attraction of the point to the outside of the cube.
So the dot is boucing around inside the cube but with an gravitational pull
towards the outside.
However if everything was balanced it wouldn't bounce for long before it
came to rest, so there's two corners which are pushing and pulling on the
object(emitting a force upon the object) but the push/pull of these corners
is rapidly switching direction.
Thus the need for velocity. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Randy Vande Hei |
last post by:
Does anyone know how to change the the GDI+ coordinate system like you used
to be able to do in VB6 with the picturebox.scale method. The
picturebox.scale method took an x,y point defining the upper left corner and
a second x,y point defining the lower right corner.
In VB6 the 0,0 location was the upper left like in GDI+, but I could at
least reset it so I could use it with lat/lons. Basically all I want to do
is be able to use the...
|
by: OtisUsenet |
last post by:
Hello,
Is there a way to use JavaScript to push a page element (a DIV block,
for example) down the screen, so it sits at the bottom of the browser
window.
For example of a bad footer location:
http://www.simpy.com/user/angusprune
Note how the footer is very high up. Is there a way to push the DIV
|
by: dhn |
last post by:
I am trying to automate the generation of scatterplots in matplotlib.
The problem of where to put the labels is known as 'point-feature
labeling' (a main application is in cartography, where cities and such
are known as 'point features'). In general the problem is not easy.
Some references:
http://www.merl.com/reports/docs/TR96-04.pdf
http://www.eecs.harvard.edu/shieber/Biblio/Papers/tog-final.pdf
If anyone knows of any canned python...
|
by: peradino |
last post by:
Hi
I have a problem when I want to know how far my cursor is from the top of pictureBox.
I can get mouse coordinate but it is screen coordinate.
I can get the top position of my pictureBox but it is the distance from its container, not the screen coordinate.
So my question is...
1.How can I get the top position of pictureBox in screen coordinate?
or esle
|
by: matt.casella |
last post by:
Hi,
I've having a *small* problem with a small simulation/game I'm trying
to write in C++ using OpenGL. I'm not sure if I need to include code
yet, as it might just make things more complicated, but I can do so if
necessary.
Basically what I'm writing involves a simple sprite fielder trying to
catch a thrown ball. The ball and the fielder are each in their
respective coordinate frames, and I'm using the matrix stack to keep
| |
by: Eric.Gabrielson |
last post by:
Hello,
I am very knew to python and am attempting to write a program
in python that a friend of mine is having to write in java. I am doing
this for fun and would like some help as to how i can generate random
coordinate points (x,y) and compare them with user inputted coordinate
points. For example how will I be able to access the separate values,
the x from the x,y position. I think I understand everything except
1)the random coordinate...
|
by: jigsmshah |
last post by:
I need to print a text file .When i print it ,it is not printed exactly form 0,0 coordiante of the page. I mean the top most left corner.It is leaving some margin from top and from left.The code is an example from MSDN.
I am using c# 2.0 and VS 2005.I have just chaged the X coordinate for the DrawString function.i am using it as 0 and the Y coordinate is calculated.
This is just a test application, as i have to take the printing logic futher...
|
by: Petra Rohmer |
last post by:
Hello,
I want to ake following
0,0 (900mm,900mm)
--------------------------------------
|....................................|
|....................................|
|....................................|
|
by: Tyler Eaves |
last post by:
Hi, wondering if anyone can help me with this. I'm trying to do some
math for a reasonably simple bit of 3d math.
Given the following.
A 3d vector pointing in an arbitrary direction, call it 'forward',
that defines the target Z-axis, and a rotation around that vector,
'roll', which defines the target Y axis.
These define the 'target' coordinate system.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |