Generate a pipeline between two points

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

public class testMesh1 : MonoBehaviour
{
    public Vector3[] DataPoint;
    Vector3 point1 = new Vector3(0, 0, 0);
    Vector3 point2 = new Vector3(1, 1, 1);

    //Vector3 circleCentre = new Vector3(0, 0, 0);
    float circleR = 1;
    Vector3 i1 = new Vector3(1, 0, 0);//坐标向量
    Vector3 i2 = new Vector3(0, 1, 0);//坐标向量
    Vector3 a, al;//单位向量a
    Vector3 b, bl;//单位向量b
    Vector3 circleXYZ;//圆的坐标

    //法线
    Vector3 n;// = new Vector3(0, 1, 0);

    //test
    void DrawGuanDao()
    {
        n = point2 - point1;

        List<Vector3> pointss1 = calculateXYZ(point1, n, circleR, 4);
        List<Vector3> pointss2 = calculateXYZ(point2, n, circleR, 4);
        pointss1.Add(pointss1[0]);
        pointss2.Add(pointss2[0]);

        //顶点
        List<Vector3> List_vertices = pointss1.Concat(pointss2)

Guess you like

Origin blog.csdn.net/yushengqi12345/article/details/111559861