Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
cube ray tracing

Subject: cube ray tracing

From: panagiotis

Date: 20 Nov, 2012 16:04:08

Message: 1 of 3

Is there any specific routine for computing the ray trace of a cube??
It is an answer to sound estimation created by a source and reflected on a (3D)cube.
If anyone has ideas it would be really helpful.

Thank you in advance
Panagiotis

For instant answer pkoniavitis@yahoo.com

Subject: cube ray tracing

From: Matt J

Date: 20 Nov, 2012 17:01:10

Message: 2 of 3

"panagiotis " <pkoniavitis@yahoo.com> wrote in message <k8g9lo$89h$1@newscl01ah.mathworks.com>...
> Is there any specific routine for computing the ray trace of a cube??
> It is an answer to sound estimation created by a source and reflected on a (3D)cube.
> If anyone has ideas it would be really helpful.

Using this

http://www.mathworks.com/matlabcentral/fileexchange/30892-representing-polyhedral-convex-hulls-by-vertices-or-inequalities


you can do

[Aray,bray]=vert2lcon(Vray);
[Acube,bcube]=vert2lcon(Vcube);

V=lcon2vert([Aray;Acube],[bray;bcube]);

Subject: cube ray tracing

From: Matt J

Date: 20 Nov, 2012 17:10:08

Message: 3 of 3

"Matt J" wrote in message <k8gd0m$kqg$1@newscl01ah.mathworks.com>...
> "panagiotis " <pkoniavitis@yahoo.com> wrote in message <k8g9lo$89h$1@newscl01ah.mathworks.com>...
> > Is there any specific routine for computing the ray trace of a cube??
> > It is an answer to sound estimation created by a source and reflected on a (3D)cube.
> > If anyone has ideas it would be really helpful.
>
> Using this
>
> http://www.mathworks.com/matlabcentral/fileexchange/30892-representing-polyhedral-convex-hulls-by-vertices-or-inequalities
>
>
> you can do
>
> [Aray,bray]=vert2lcon(Vray);
> [Acube,bcube]=vert2lcon(Vcube);
>
> V=lcon2vert([Aray;Acube],[bray;bcube]);

Make that


  [Aray,bray,aeq,beq]=vert2lcon(Vray);
  [Acube,bcube]=vert2lcon(Vcube);
 
  V=lcon2vert([Aray;Acube],[bray;bcube],aeq,beq);

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us