SVD
darren_13
Member, Developers Posts: 120 PRO
I have a vector which is the normal to a plane to create another plane x distance in the normal from the original plane I want to find the unit vector of the normal. I wanted to use svd but I can't figure how to use is where do I put the 'u' in svd? my code looks like this:
//Make Plane normal<div> var centerPlane = evFaceTangentPlane(context, {</div><div> "face" : definition.selectPlane,</div><div> "parameter" : vector(0.5, 0.5)</div><div> });</div><div> </div><div> var normal = centerPlane.normal</div>
Tagged:
0
Comments
-
once again don't know why this formatting has changed0
-
Hi Darren, I'm not sure I understand the question. You already have the unit normal in your code above. Also what is SVD? (Hope I don't get embarrassed for not knowing what that is!)Senior Director, Technical Services, EMEA0
-
ok looking back over the documentation it appears that I do have unit normal that I'm after, so now the question is could I have used svd? in the documentation,
svd (m is Matrix) returns map
Compute the singular value decomposition of a matrix, i.e.
s,u, andv, wherem == u * s * vand s is a diagonal matrix of singular values.where u would give me a unit vector? how would I set this up?
It would be really handy if I could view what my variables and constants contain like I do in matlab? because I find myself asking quite a lot of questions I could answer myself if I could see what is being created.
Thanks for your speedy response
Darren Lynch
0 -
Darren, centerPlane.normal is already unit-length, so you don't need to do anything with it. If it were not unit-length, you could use the normalize function to make it unit-length. The SVD is for other more mathy things (computing matrix rank, orthonormalizing a matrix, computing a pseudo-inverse, principal component analysis, solving poorly conditioned linear systems, finding low-rank matrix approximations, to name a few).Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
ok, thanks ilya!
0


