#### moving in 3D

```HI
I've two positions, one is nearer than the other in z. Both have
different x. Now how should I turn them together?

-----------

double theta = (double) heading * 3.14 / 180.0;

SourcesPos[i][0] = -float(cos(theta)); //not ok if i do: -0.2

SourcesPos[i][1] = -float(rand()%2);

SourcesPos[i][2] = -float(sin(theta)) //not ok if i do +0.7

---------
Many thanks
Michael
```
 0
Mike
5/25/2010 8:56:13 AM
comp.lang.c++ 49047 articles. 0 followers.

3 Replies
518 Views

Similar Articles

[PageSpeed] 19
```On May 25, 11:56=A0am, Mike <michael.sg...@gmail.com> wrote:
> HI
> I've two positions, one is nearer than the other in z. Both have
> different x. Now how should I turn them together?
>
> -----------
>
> double theta =3D (double) heading * 3.14 / 180.0;
>
> SourcesPos[i][0] =3D -float(cos(theta)); //not ok if i do: -0.2
>
> SourcesPos[i][1] =3D -float(rand()%2);
>
> SourcesPos[i][2] =3D -float(sin(theta)) //not ok if i do +0.7

Huh? Mike, maybe someone smarter gets what you are doing, i don't.

4dfd#

There it eventually describes how to post in a way so we can help
you.

```
 0
ISO
5/25/2010 10:01:27 AM
```it works but not if i move a source away either in z or x axis.
```
 0
Mike
5/25/2010 11:34:39 AM
```On 5/25/2010 7:34 AM, Mike wrote:
> it works but not if i move a source away either in z or x axis.

I think you're lacking proper algorithm, for which you can seek help in
the 'comp.programming' NG or the 'sci.math.*' hierarchy.  When you have
a question on the C++ *language*, come back and ask it.

V
--
```
 0
Victor
5/25/2010 12:42:28 PM
Similar artilces about - moving in 3D:

previous installed Linux need to move to another machine?
Hi, I had an installed Mandraked9.1 Linux on one machine and like to moved it to another machine. I checked the messages output and it seems to look into the previous machine's /etc/modules.conf to configure the new mahcine. The result was linux unable to configure the new machine hardwares such as the etho, vedio card etc. What is the required changed in order to use the pre-installed linux to the new hardware system? Thanks for helping in advance - Mike On 4 Feb 2004 18:32:25 -0800, Mike wrote: > Hi, > > I had an installed Mandraked9.1 Linux on on...

moving from small to big programs
So I'm learning objectiveC/Cocoa, writing cute little programs per the Hillegass book. Then I'm gonna want to write a big program. How do I learn how to do that? When planning this ask yourself is this "big" program really a bunch of smaller ones jamed together haphazardly. Too many functions in one program are not good idea and they confuse the user and make the program unstable. A program should do one thing and do it well and not try to be the kitchen sink. Also most big programs in Cocoa/Objective C are not huge like stuff in C or C++ because so much is al...

Moving the ledmac textblock
I am trying to set a facing-column translation with ledmac/ledpar as part of a larger essay. The essay has large outer margins with marginal notes, and I would like the ledmac sections to expand to fill a space \textarea + \marginparsep + \marginparwidth. I have seen this sort of textblock readjustment done many times for figures and tables, but ledmac just won't budge. I've tried using the ledgroupsized environment in the package, as well as the list environment (and derived commands in the memoir package), which correctly allow the ledgroup to expand to the right on recto pages, but ...

Re: Converting 2d points to a 3d vector model
here is a solution to the revobjects function in matlab this function will work for any number of points in the profile function RevObjectV11(n) n%revObject was modified so that it will take any number of points read in %from a text file as long as they are in order to give a profile of an %image. U = dlmread('filename'); [a,b] = size(U); f = (a - 1); g = (a-2); numnodes = a*n; numpatch = (a-1)*n; Node = zeros(numnodes,3); PSet = zeros(numpatch,4); %Now calculate all the node values for k = 0:n-1 for L = 1:a theta = 2*k*pi/n; Node(L+a*k,1) = U(L,1)*cos(theta);...

moving FBSD to other factory-new harddrives
Hello NG, i have installed a good system (for my opinion of course ;-) . Now i want to have exactly the same system on more computers. How do i make these copies to factory-new harddisks? The goal is to put in the new harddisk in my existing system. Do something (???). Put the new (ready with all partitions) harddisk into the othe computer. Thanks for any hints! Peter Peter Pippinger <peter.pippinger@gmx.de> wrote: > Hello NG, > > i have installed a good system (for my opinion of course ;-) . Now i > want to have exactly the same system on more comput...

FAQ moved?
Has the FAQ moved from http://home.comcast.net/~j.p.h/cus-faq.html? I haven't been able to access it there for several days ("PAGE UNAVAILABLE This URL you typed is unavailable at this time.")... Ed. On 2007-05-10, Ed Morton wrote: > Has the FAQ moved from http://home.comcast.net/~j.p.h/cus-faq.html? I > haven't been able to access it there for several days ("PAGE UNAVAILABLE > This URL you typed is unavailable at this time.")... For now, I have put it on my site: <http://cfaj.freeshell.org/shell/cus-faq.html> -- Chris F.A. Johnso...

ZFS move pool
I have a x86 server with 10 06/06 which has one dedicated disk for users (/export/home) c0d0 built with zpool/zfs. Now I want to replace that with two new larger disks (c1d0 and c2d0) for more space and redundancy. /etc/auto_home +auto_home * localhost:/export/home/& Is this a workable approach to use in full operation? zpool replace tank c0d0 c1d0 zpool attach tank c1d0 c2d0 /Thommy M. Thommy, If your hardware will allow, I would consider creating a new mirrored pool with the 2 new drives, then use zfs send & receive to migrate the data over. Just my \$.02 -Shane Thommy M...

Moving average
Does anyone know a simple way to create the n-point moving average of a set of numbers in a file in a shell script? I would think awk might be able to do it in some way, though I don't have a clue how. dave On 2010-04-13, Dr. David Kirkby <david.kirkby@onetel.net> wrote: > Does anyone know a simple way to create the n-point moving average of > a set of numbers in a file in a shell script? I am not sure this is the right tool for the job. > I would think awk might be able to do it in some way, though I don't > have a clue how. awk -v points=3 -f...

Efficient Moving Average and Moving Variance Calculations
Steven Smith in "Digital Signal Processing" describes an efficient algorithm for computing a moving average. This algorithm is also mentioned in the Wikipedia article describing Moving Average: http://en.wikipedia.org/wiki/Moving_average Rick Lyons once asked in this newsgroup about an efficient algorithm for computing "moving variance": http://groups.google.com/group/comp.dsp/browse_frm/thread/330ac90a92f8dfaf/02a3b89dcf21fdcc?hl=en&lnk=st&q=variance+group%3Acomp.dsp+author%3AHadstate#02a3b89dcf21fdcc With minimal effort, one can modify the "Moving Averag...

Hi guys, If I have for instance a series of vectors: 0.8559 + 0.4676i , 0.5140 + 0.8004i, 0.0656 + 0.9254i , -0.3765 + 0.8228i, and I need a plot that would actually show as if it was adding them in 3D, as they have an angle so this will take a form of a spiral. thought of using compass but it doesn't actually do addition of vectors!! Would appreciate any help. Thanks loads. Ana ...

Re: Moving to the next line #4
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Thomas A Schmitt > Sent: Saturday, July 21, 2007 7:56 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Moving to the next line > > Thank you for your help on this Howard and Roland! I did try > it in my program as > below. Howard, I'm not sure if I'm integrating your method > correctly. I included > a little larger section of my data below. I'm getting some > other numbers and I > also do get some leading and trailing periods in the rows. >...

how to get mouse move
Hi, O/S: RedHat 9 OpenInventor from TGS. I would like to get mouse move action, without button down while moving (SoLocation2Event). Any help is appriciated. SoThanks, -Shooki Shooki <joshxki@yahoo.com> wrote in message news:<40157198\$0\$43849\$39cecf19@news.twtelecom.net>... > Hi, > > O/S: RedHat 9 > OpenInventor from TGS. > > I would like to get mouse move action, without button down while moving > (SoLocation2Event). > > Any help is appriciated. > > SoThanks, > -Shooki Try this: in your callback function, d...

mesh graph in java? (i.e. matlab 3d plot)
It it possible in java to create a mesh graph like in matlab? Any advice is appreciated. On Jan 6, 10:24=A0am, NickPick <dickreu...@yahoo.com> wrote: > It it possible in java to create a mesh graph like in matlab? Any > advice is appreciated. Of course it is. Java is Turing-complete. You'll want to study the Java 2D API to know how to actually render the results: http://java.sun.com/docs/books/tutorial/2d/index.html and also the Javadocs for Graphics2D and friends, which should be linked from the above. Of course you'll need to generate the mesh from something, and p...

Keyboard resizeing and moving of JInternalFrame
Hoi, When a JTextField in a JInternalFrame has keyboard focus, it becomes impossible to move or resize the JInternalFrame left and right with the keyboard (Ctrl+F7 and Ctrl+F8). Only up and down remain. If a button has keyboard focus, resize and move works in all directions. The mouse remains almighty, as usual, but that is not what I like. Is this a bug or a feature? Geert PS. in my real e-mail address, there are dots between my initials. Don't tell the spammers. ...

Moving a Project
I have a project shell that was created on a computer. I need to know how I can move it to another computer? Troy wrote: > I have a project shell that was created on a computer. I need to know > how I can move it to another computer? There are many ways. You could start an ftp server (either on the other computer, or on this computer, or even on the third computer) and use it to transfer files. You can do it over the web, or sometimes in e-mail. In the old days we used a gadget called "floppy disk", which we'd insert in a "drive" and then copy files on it, ...

[News] Sun's Open Source Moves Discussed and Cisco Makes Own Open Source Moves
Sun's open source strategy questioned ,----[ Quote ] | The company has been offering up to open source crown jewels such as its Java | platform and the Solaris OS. Singer, who was vice president of Global | Information Systems Strategy at Sun, stressed that he agreed with a lot of | the open source efforts, such as open-sourcing Solaris and Java. But he said | he thought the company was over-emphasizing open source when it should have | been focusing on generating revenues; he disagreed with new CEO Jonathan | Schwartz about the effort and this was one reason Singer left the company...

DMT is moving - and
This is a multi-part message in MIME format. ------=_NextPart_000_06E5_01C3C4AC.3A9554F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit DMT is moving to a new location next week. Please be patient if you have any problem contacting us while the telephone and internet services are being switched over. The new address is: Database Management Technology, Inc. 218 Delaware Street, Suite 406 Kansas City, MO 64105 USA Telephone: 816-421-3500 Fax: 816-421-6328 www.dmt.com (Note: our phone numbers and e-addresses have...

Maple 10.03: 3d rotation is sloow or freezes
Hello, Just updated to 10.03 and rotating 3D graphs is very sloow or impossible since sometimes the viewing area just blanks out. Anyone have a similar problem? Walter Kehowski "wkehowski@cox.net" <wkehowski@cox.net> wrote: > Just updated to 10.03 and rotating 3D graphs is very sloow or > impossible since sometimes the viewing area just blanks out. Anyone > have a similar problem? I perceive no difference to 10.02. Did you check "Use hardware acceleration for plots" in Tools > Options > Display? What platform(s) are you running Ma...

moving elements in an array
Hello all.&nbsp; I have a 1-D array that has 64 elements in it.&nbsp; I also have a 2-D array of color boxes.&nbsp; I need to take the elements in the 1-D array and place them in a specific address of the 2-D array.&nbsp; The 2-D array is 12 col by 6 rows.&nbsp; Can anybody offer any suggestions on how do this? Thanks, Matt Kniller Nova Research Inc. Here is a map that I made up for my own sanity. Col A is the layout of my 1-D array Col B is address of the 2-D array that the elememt of the 1-D array needs to be moved to. The picture on the right shows the "2-D ar...

3D plotting issues
I'm working on recoding an older application to produce an isoplot (waterfall of PSDs) that displays time,frequency and amplitude. I've tried using the built-in waterfall plot as a start, but my dataset appears to be far to large for the renderer, at least for my system. Has anyone done any work on creating pseudo-3d plots in MATLAB? ...

Moving towards Extreme Programming
I'm part of a workflow solution .Net development team. We are currently on version 3.0 of our product so we have good experience on this kind of product and we think we have a good understanding of what our clients want in this kind of system. Lately I started to get an increased interest in agile methodologies in general. I've been studying on my own but sadly, as far as I know, the company has no plan on adopting an agile development process. Maybe I can convince them but first I want to be sure I'm convinced and have a good understanding of its benefits. I'm quite seduced ...

Question : graph 3D and matrix
Hi everyone, How to make a graph 3d starting from a matrix n*3? May I use the fonction "mesh" or another? Please help me! Vinc_get31 Vinc_get31 wrote: > > > Hi everyone, > > How to make a graph 3d starting from a matrix n*3? > May I use the fonction "mesh" or another? > > Please help me! > > Vinc_get31 > First use griddata to create a surface. THen you can use mesh on that surface. Ross Ross Woods wrote: > First use griddata to create a surface. THen you can use mesh on that surface. How can I use this fonction? The he...

Reason to move from 5.1 to 6?
Can anyone explain particular benefits of upgrading from 5.1 to 6? About the only annoyance I find in 5.1 is the inability to rename "dominant" to "username" (and I have no idea whether an upgrade will cure that problem). But maybe there are other advantages that I don't know about simply because I don't have them. Eudora website doesn't offer much comparison that I can locate. Thanks for any advice. Molin Molin Vardo <Molingfort@netscape.net> wrote: > Can anyone explain particular benefits of upgrading from 5.1 to 6? > About t...

moved adapi.cfg from local machines to network, PROMBLEMS
I cannot open any of the databases, they all give me an alias error, it asks if I want to "remmap" the path. I select the one it weas asking, and it just doesnt seem to do anything? My crew cannnot use this base and we are stummed..thanks for any help. Chris > I cannot open any of the databases, they all give me an alias error, > it asks Can the machines all see the new path[s]? Using Windows Explorer, see if the path[s] are even visible. Is the path EXACTLY the same on ALL machines (ONLY drive letter can be different)? With this kind of issue, the...

viewing of 3D volumes
Hi! I would like to view the slices in a 3D view(e.g, a MRI slice), meanwhile overlay a streamtube on the slices. For the best viewing results, the slice should be in grayscale while and streamtubes in color. The 'slice' command can do the job, but all color and lighting settings for the streamtubes are lost. Is there any method to overlay a colored object(streamtube) on top of a grayscale 3D slice? Many thanks :) Is there any method to > overlay > a colored object(streamtube) on top of a grayscale 3D slice? There are a variety of tricks. One way would be to force either ...