A vector is a quantity that has both magnitude and direction. It is represented by an arrow whose length represents the magnitude of the vector and whose direction represents the direction of the vector1.
Normal Vector
A normal vector is a vector that is perpendicular or orthogonal to another vector or plane. If we talk about the technical aspect of the matter, there are an infinite number of normal vectors to any given vector as the only standard for any vector to be regarded as a normal vector is that they are inclined at an angle of 90° to the vector2.
Code to Rotate any entity along z axis passing through given point
[CommandMethod("DrawRectangle")]publicstaticvoidDrawRectangle(){using(Transactiontr=ActiveUtil.TransactionManager.StartTransaction()){Polylinepline=newPolyline();pline.AddVertexAt(0,newPoint2d(0,0),0,0,0);pline.AddVertexAt(1,newPoint2d(10,0),0,0,0);pline.AddVertexAt(2,newPoint2d(10,5),0,0,0);pline.AddVertexAt(3,newPoint2d(0,5),0,0,0);pline.Closed=true;//vector representing z axisVector3dnormal=newVector3d(0,0,1);//here entity will get rotated around z axis passing through chosen pointpline.TransformBy(Matrix3d.Rotation(30*(Math.PI/180),normal,newPoint3d(0,0,0)));ActiveUtil.Database.GetModelSpace(OpenMode.ForWrite).AppendEntity(pline);tr.AddNewlyCreatedDBObject(pline,true);tr.Commit();}}