Hi,
I am now doing a project to create a 3d model which is formed of several solids for example cylinders and domes, frustrums and some planes, and I have meshed all the solids into different meshs with a mesh_center and a mesh area,
I want to find if there is a block of line of sight between each mesh. for instance, if there is a small cylinder between one plane and a frustrums, I want to identify which mesh frustrums could be observed by a mesh in the plane.
I try searching on the internet and found LOS2() which might be useful. however, I dont know how to convert all the solids and pts in the 3d coordinates into lantitudes and longtitude and the way to define the reference vector as it is a simulation model but not a map.
Please help by providing ways to concert the coordinates or suggesting any other way to do the task of determine whether a line of sight is obstructed?
(I thought of using mathematical method through a vector between 2 mesh centers and searching all the point in the middle if it is inside anything in between but seems to be too comsy)
|
|
0
|
|
|
|
Reply
|
augustinetine (6)
|
6/13/2012 3:25:07 AM |
|
Thanks in advance!!
|
|
0
|
|
|
|
Reply
|
augustinetine (6)
|
6/13/2012 3:32:07 AM
|
|
Hi,
the problem could not be solved yet.
I tried to transform all the points into lantitude and longitude by the following code,
function [lan lon apt] = cart2geo(x,y,z)
if nargin<3
msgbox('invalid input','invalid','none','modal');
elseif ~isequal(size(x),size(y),size(z))
msgbox('invalid input','invalid','none','modal');
return;
end
for i = 1: size(x,1)
for j = 1: size(x,2)
lan(i,j) = atan2(z(i,j),x(i,j))*180/pi;
lon(i,j) = atan2(y(i,j),x(i,j))*180/pi;
apt(i,j) = sqrt(x(i,j)^2+y(i,j)^2+z(i,j)^2);
end
end
end
but it doesnt work as the lan and lon are not even, which is the projection on the earth and the point will be shifted.
so I wonder if there's way to transform the cartesian coordinates to lan and long accurately?
thanks in advance.
augustine
|
|
0
|
|
|
|
Reply
|
augustinetine (6)
|
6/18/2012 1:14:07 AM
|
|
On Wednesday, June 13, 2012 3:25:07 PM UTC+12, Kin Sum Augustine wrote:
> Hi,=20
> I am now doing a project to create a 3d model which is formed of several =
solids for example cylinders and domes, frustrums and some planes, and I ha=
ve meshed all the solids into different meshs with a mesh_center and a mesh=
area,=20
> I want to find if there is a block of line of sight between each mesh. fo=
r instance, if there is a small cylinder between one plane and a frustrums,=
I want to identify which mesh frustrums could be observed by a mesh in the=
plane.=20
>=20
> I try searching on the internet and found LOS2() which might be useful. h=
owever, I dont know how to convert all the solids and pts in the 3d coordin=
ates into lantitudes and longtitude and the way to define the reference vec=
tor as it is a simulation model but not a map.=20
>=20
> Please help by providing ways to concert the coordinates or suggesting an=
y other way to do the task of determine whether a line of sight is obstruct=
ed?
>=20
> (I thought of using mathematical method through a vector between 2 mesh c=
enters and searching all the point in the middle if it is inside anything i=
n between but seems to be too comsy)
You need a map projection to do this.
Have a look here:
http://www2.ocgy.ubc.ca/~rich/map.html
It is a (free) mapping toolbox for Matlab.
|
|
0
|
|
|
|
Reply
|
mulgor (2847)
|
6/18/2012 2:59:18 AM
|
|
"Kin Sum Augustine" wrote in message <jrlvcv$90f$1@newscl01ah.mathworks.com>...
> lan(i,j) = atan2(z(i,j),x(i,j))*180/pi;
Not sure what is "lantitude", but the latitude is atan(z / sqrt(x^2+y^2)) in degree.
Bruno
|
|
0
|
|
|
|
Reply
|
b.luong5955 (6341)
|
6/18/2012 6:46:07 AM
|
|
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jrmirf$oj7$1@newscl01ah.mathworks.com>...
> "Kin Sum Augustine" wrote in message <jrlvcv$90f$1@newscl01ah.mathworks.com>...
>
> > lan(i,j) = atan2(z(i,j),x(i,j))*180/pi;
>
> Not sure what is "lantitude", but the latitude is atan(z / sqrt(x^2+y^2)) in degree.
>
> Bruno
thanks a lot for the reply.
and sorry for the late reply since I did not check this post frequently
Right, I just realised i made a mistake for that.
and I dont really understand how the tool can help me with this problem.
can you please explain a little bit, TideMan?
and now I am working on a solution with ray tracing to solve this problem.
but still working on it. seems working though.
thanks again, and if there is any other way to do the line of sight technique, please share with me!
Augustine
|
|
0
|
|
|
|
Reply
|
augustinetine (6)
|
6/22/2012 5:49:10 AM
|
|
|
5 Replies
78 Views
(page loaded in 0.163 seconds)
Similiar Articles: 'Yes' or 'No' question regarding optimization algorithms - comp ...Ant colony algorithm - comp.soft-sys.matlab 'Yes' or 'No' question regarding ... 'Yes' or 'No' question regarding optimization ... Line drawing with Bresenham more than one ... Creating a plane at an angle - comp.cad.solidworks... Post Question | Groups ... bob z. has a little macro that creates a plane normal to your view (line of sight). color detection in matlab - comp.soft-sys.matlab... Post Question | Groups ... bit of PIC to acknowledge PC that parcel or desired object is in LINE OF SIGHT of ... comp.sys.ibm.pc.games.war-historical - page 13... Post Question | Groups ... pack for Field of Glory is out, with random battles, new units, line of sight and ... Some text processing questions - comp.lang.vhdl... in a testbench, I came upon a couple of questions regarding te... ... are* good answers to at least some of your questions. >1) It seems to be impossible to pass "line ... Why are lights moving? - comp.graphics.api.opengl... Post Question | Groups ... that appears to be positioned at or near the eye and shining along the line of sight ... 1900 question - comp.dcom.sys.ciscocconnell_1@lycos.com writes: >Hi I have a small question regarding a cisco 1900, I want to ... load, so you can do some trunking and you get the weak command line.. LACP? Password Security and /etc/default/passwd - comp.unix.solaris ...A couple of questions regarding pam_authtok_check and friends. 1) What does the NAMECHECK ... The following line indicates that the password information in the /etc ... Bad use of stringstream temporary? - comp.lang.c++The basic question is whether the following line of code is legal and good (according to the ... Mrz., 18:58, K. Frank wrote: > > > I have a follow-up question concerning ... Calling dll from Matlab - comp.soft-sys.matlabHi all, I have a question regarding calling shared libraries for windows from .dll. ... Found on line 411 of input from line 598 of file C:\Users\ecinar\Desktop ... Questions concerning line of sight - Newsreader - MATLAB CentralFile exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community Question regarding Warmachine Line of SightHey all, I was wondering about line of sight rules. My Bretonnian fellows at the ... When they say "cunning construction" I think they mean the model itself, and not ... 7/17/2012 8:47:21 AM
|