TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: well20152016 on December 18, 2017, 06:19:09 PM

Title: How to calculate nor mathematics? nor (<AOC)
Post by: well20152016 on December 18, 2017, 06:19:09 PM
Prerequisite:
point A ,
point O ,
point B ,
<AOB=90,
<AOC=90,
<COB=90,

Result: nor (<AOC)
Title: Re: How to calculate nor mathematics? nor (<AOC)
Post by: kdub_nz on December 18, 2017, 06:30:20 PM

I can't understand what you are trying to do ... Do you want to establish some sort of truth table regarding angle equality ??

Title: Re: How to calculate nor mathematics? nor (<AOC)
Post by: Lee Mac on December 18, 2017, 06:30:49 PM
Use the vector cross product (https://en.wikipedia.org/wiki/Cross_product) - there are plentiful examples on the forum.
Title: Re: How to calculate nor mathematics? nor (<AOC)
Post by: ssdd on December 18, 2017, 06:32:56 PM
Code - Auto/Visual Lisp: [Select]
  1. (setq nor (v^v (setq x (mapcar '- pt3 pt1)) (mapcar '- pt2 pt1)))
  2.   (defun v^v ( u v )
  3.     (mapcar '(lambda ( n ) (- (* (nth (car n) u) (nth (cadr n) v)) (* (nth (cadr n) u) (nth (car n) v)))) '((1 2) (2 0) (0 1)))
  4.   )



EDIT (John 7 Kaul): Added code tags.
Title: Re: How to calculate nor mathematics? nor (<AOC)
Post by: well20152016 on December 21, 2017, 06:35:26 PM
Thank you for kdub, Lee Mac, ssdd.
But I'm not good at math. Who can help me?
Title: Re: How to calculate nor mathematics? nor (<AOC)
Post by: kdub_nz on December 21, 2017, 09:05:44 PM

Have a look at something like this.
https://www.mathsisfun.com/algebra/vectors-cross-product.html

I'd like to see a better description of your actual problem.

... this will help others to be of more assistance.