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:
Find direction with minimal angle to given set of directions in 3d

Subject: Find direction with minimal angle to given set of directions in 3d

From: Johannes Korsawe

Date: 22 Feb, 2012 11:46:13

Message: 1 of 1

Dear community,

maybe the following is a simple problem.

Let direc be a set of normalized 3d vectors, size(direc) = [nd, 3]. All 3d vectors are normalized and pointing towards the same side of some half plane, i.e. all vectors have less then 180 degrees angle to each other pairwise.
I am looking for the normalized vector solution, size(solution) = [1,3] with

(Eq.1) sum_over_all_i ( angle(solution,direc(i,:) ) ) = minimal

for all three-dimensional possible solution vectors with norm(solution)=1.

What has to be done here? I know the brute-force approach to reformulate (Eq.1) into some target function for a minimization problem with fminsearch.

But is there also some elegant geometric solution? I thought about distances on the unit sphere and such stuff, but i did not find elegant formulations.

Thanks and best regards,
Johannes

Tags for 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