Exemplo n.º 1
0
        public void RMul(ref QPoint q)
        {
            QPoint qc = q;

            qc.LMul(ref this);
            this = qc;
        }
Exemplo n.º 2
0
        // l=r*(w)*r^(-1)
        public void LtoW_V(ref RPoint LP, out RPoint WP)
        {
            QPoint Q = new QPoint(LP, 0.0);

            Q.LMul(ref m_R);
            Q.RDiv(ref m_R);
            WP = Q.PT;
        }
Exemplo n.º 3
0
        // |b|=1
        public void RDiv(ref QPoint q)
        {
            QPoint qc = q;

            qc.Conj();
            qc.LMul(ref this);
            this = qc;
        }
Exemplo n.º 4
0
        //
        // new(L) = par(this(L))
        protected void ApplyRt(ref RPoint tr, ref QPoint rt)
        {
            QPoint QT = new QPoint(m_T, 0);

            QT.LMul(ref rt);
            QT.RDiv(ref rt);
            m_T = QT.PT;
            m_T.Add(ref tr);
            m_R.LMul(ref rt);
        }
Exemplo n.º 5
0
        //
        public static CTrans FromAxis(RPoint pt, RPoint vec, double an)
        {
            an *= Math.PI / 360.0;            // half in radians
            RPoint T = RPoint.Zero;
            RPoint C = pt;

            double lR = vec.Dist();
            double xc = Math.Cos(an), xs = Math.Sin(an);

            vec.Mul(xs / lR);
            QPoint R = new QPoint(vec, xc);

            R.Norm();
            // w=R^(-1)*(l-C)*R+C
            T.Add(ref C);
            QPoint QC = new QPoint(C, 0);

            QC.LMul(ref R);
            QC.RDiv(ref R);
            T.Sub(ref QC.PT);
            return(new CTrans(T, R));
        }