当前位置: 首页 > news >正文

广州好的做网站公司自媒体软文发布平台

广州好的做网站公司,自媒体软文发布平台,电子商务网站建设调查问卷,快照不更新一:点乘介绍 1. 向量点乘: 2. 向量点乘的性质: 3. 向量点乘公式: 4. 向量的点乘的属性: (1):向量与自身做点乘,会得到向量长度的平方: (2&#xf…

一:点乘介绍

        1. 向量点乘:

        

        2. 向量点乘的性质:

        

       3. 向量点乘公式:

        

        

        

      4. 向量的点乘的属性:

        (1):向量与自身做点乘,会得到向量长度的平方:

        (2):向量长度,为向量与自身点乘后再求平方根:

        (3):向量投影,将a向量投影到向量b上:

        (4):向量夹角:

二:叉乘介绍:

        1. 向量叉乘:

           

        2. 向量叉乘公式:

         

        3. 向量叉乘的属性:

                判断三个向量是否共面:

三:应用1 - 求两直线的交点:

        (1)2D直线方程:

        (2)将直线1带入直线2中:  ,叉乘等于0,意味着两向量共线。

        (3)求交点:

                

四:应用2 - 求三个平面的交点:

        (1):三个平面方程:

                

        (2):三个平面方程,三个未知数,利用克拉默法则求解即可。

三:实现

#ifndef _POINT_H_
#define _POINT_H_#include <iostream>
#include <cmath>class Point2D
{
public:float x, y;Point2D() {}Point2D(float x, float y) : x(x), y(y) {}Point2D &operator+=(const Point2D &t){x += t.x;y += t.y;return *this;}Point2D &operator-=(const Point2D &t){x -= t.x;y -= t.y;return *this;}Point2D &operator*=(float t){x *= t;y *= t;return *this;}Point2D &operator/=(float t){x /= t;y /= t;return *this;}Point2D operator+(const Point2D &t) const{return Point2D(*this) += t;}Point2D operator-(const Point2D &t) const{return Point2D(*this) -= t;}Point2D operator*(float t) const{return Point2D(*this) *= t;}Point2D operator/(float t) const{return Point2D(*this) /= t;}float dot(const Point2D& b) const{return x * b.x + y * b.y;}friend std::ostream &operator<<(std::ostream &out, const Point2D &t){out << '(' << t.x << ',' << t.y << ')';return out;}};Point2D operator*(float a, const Point2D &b)
{return b * a;
}float dot(const Point2D& a, const Point2D& b)
{return a.dot(b);
}float norm(const Point2D& a)
{return dot(a, a);
}double abs(const Point2D& a) {return sqrt(norm(a));
}double proj(const Point2D& a, const Point2D& b)
{return dot(a, b) / abs(b);
}double angle(const Point2D& a, const Point2D& b)
{return acos(dot(a, b) / abs(a) / abs(b));
}float cross(const Point2D& a, const Point2D& b)
{return a.x * b.y - a.y * b.x;
}Point2D intersect(const Point2D& a1, const Point2D& d1, const Point2D& a2, const Point2D& d2)
{return a1 + cross(a2 - a1, d2) / cross(d1, d2) * d1;
}class Point3D: public Point2D
{
public:float z;Point3D() {}Point3D(float x, float y, float z) : Point2D(x, y), z(z) {}Point3D &operator+=(const Point3D &t){x += t.x;y += t.y;z += t.z;return *this;}Point3D &operator-=(const Point3D &t){x -= t.x;y -= t.y;z -= t.z;return *this;}Point3D &operator*=(float t){x *= t;y *= t;z *= t;return *this;}Point3D &operator/=(float t){x /= t;y /= t;z /= t;return *this;}Point3D operator+(const Point3D &t) const{return Point3D(*this) += t;}Point3D operator-(const Point3D &t) const{return Point3D(*this) -= t;}Point3D operator*(float t) const{return Point3D(*this) *= t;}Point3D operator/(float t) const{return Point3D(*this) /= t;}float dot(const Point3D &t) const{return x * t.x + y * t.y + z * t.z;}friend std::ostream &operator<<(std::ostream &out, const Point3D &t){out << '(' << t.x << ',' << t.y << ',' << t.z << ')';return out;}
};Point3D operator*(float a, Point3D b)
{return b * a;
}float dot(const Point3D& a, const Point3D& b) 
{return a.dot(b);
}float norm(const Point3D& a) 
{return dot(a, a);
}double abs(const Point3D& a) {return sqrt(norm(a));
}double proj(const Point3D& a, const Point3D& b)
{return dot(a, b) / abs(b);
}double angle(const Point3D& a, const Point3D& b)
{return acos(dot(a, b) / abs(a) / abs(b));
}Point3D cross(const Point3D& a, const Point3D& b)
{return Point3D(a.y * b.z - a.z * b.y,a.z * b.x - a.x * b.z,a.x * b.y - a.y * b.x);
}float triple(const Point3D& a, const Point3D& b, const Point3D& c) 
{return dot(a, cross(b, c));
}Point3D intersect(const Point3D& a1, const Point3D& n1, const Point3D& a2, const Point3D& n2, const Point3D& a3, const Point3D& n3) 
{Point3D x(n1.x, n2.x, n3.x);Point3D y(n1.y, n2.y, n3.y);Point3D z(n1.z, n2.z, n3.z);Point3D d(dot(a1, n1), dot(a2, n2), dot(a3, n3));return Point3D(triple(d, y, z),triple(x, d, z),triple(x, y, d)) / triple(n1, n2, n3);
}#endif

http://www.dinnco.com/news/75821.html

相关文章:

  • 网站后台超链接怎么做seo是一种利用搜索引擎的
  • 用织梦做政府网站老被黑北京seo推广公司
  • 做网站建设优化的电话话术怎么在百度发布自己的文章
  • 网站空间空间租赁怎么做网站模板
  • 义乌做网站公司百度识图网页版 在线
  • 做网站公司宣传语seo综合查询站长工具
  • c2c网站建设百度输入法
  • 做网站最小的字体是多少像素外贸推广渠道有哪些
  • 潍坊科技网站建设app优化推广
  • 读书网网站建设策划书口碑营销方案怎么写
  • wordpress 超过了站点的最大上传限制环球网疫情最新
  • o2o网站源码app电商网站建设公司
  • java开发网站开发教程百度广告投放平台叫什么
  • 怎么做网站的外部连接什么是软文营销?
  • framer网页界面设计九江seo优化
  • 云网站 制作zac博客seo
  • 甘肃省交通建设项目招投标中心网站登封网站建设公司
  • 网站除了做流量还需要什么软件上海seo网络优化
  • 注册免费网站爱网站关键词查询工具
  • 网站输入一级域名自动跳转二级域名江苏网站seo
  • 《动态网站建设》第02章在线测试近10天的时事新闻
  • 淘宝客手机网站怎么做企业公司网站建设
  • 中牟网站建设免费优化网站
  • 门户网站建设工作流程小熊猫seo博客
  • 大浪做网站chrome网页版入口
  • 河南安阳疫情最新消息外贸seo是啥
  • 上海南站网站建设公司品牌策划方案模板
  • 厦门商城网站建设seo优化的价格
  • 苏州网站建设营销推广百度销售推广
  • 在哪个网站买做性的人seo优化的搜索排名影响因素主要有