<jupyter_start><jupyter_text>Plots for the Readme.md document Generate a 3D plot containing 3 points that form a triangle ABC. Then plot an orthogonal line to the plane with a cone on its end to represent an orthonormal vector to the ABC plane.  The cone primitiveThe center of the cone is represented by x, y, z.Its direct<jupyter_code>import plotly
import plotly.offline as po
import plotly.graph_objs as go
from plotly import tools
data = [{
    'type': 'cone',
    'x': [1], 'y': [1], 'z': [4],
    'u': [1], 'v': [20], 'w': [0]
}]
figure = go.Figure(data=data)
po.plot(figure, filename='cone.html')<jupyter_output><empty_output><jupyter_text>3D Scatter<jupyter_code>import numpy as np
import sys
sys.path.append('../')
from coordinates import CoordinateSystem
from coordinates import CartesianCoordinate
A = CartesianCoordinate(1.0, 3.0, 1.0)
B = CartesianCoordinate(3.0, 2.0, 2.0)
C = CartesianCoordinate(2.0, 5.0, 3.0)
x_data = np.array([A.x, B.x, C.x])
y_data = np.array([A.y, B.y, C.y])
z_data = np.array([A.z, B.z, C.z])
trace_triangle = go.Scatter3d(x=x_data,
                       y=y_data,
                       z=z_data,
                       mode='markers',
                       marker=dict(size=7,
                                 line=dict(color='#fff3ff',
                                           width=0.5),
                                 opacity=0.8),
                       connectgaps=True)
vector_AB = B - A
vector_BC = C - B
normal_vector = np.cross(vector_AB, vector_BC)
normal_vector
x_data = np.array([0,normal_vector[0]])
y_data = np.array([0,normal_vector[1]])
z_data = np.array([0,normal_vector[2]])

trace_normal_vector = go.Scatter3d(x=x_data, y=y_data, z=z_data,
    marker=dict(
        size=4,
        color='#2f77b4'
    ),
    line=dict(
        color='#2f77b4',
        width=1
    )
)
trace_cone = {
    'type': 'cone',
    "sizemode": "absolute",
    "sizeref": 0.5,
    "anchor": "tail",
    'x': [normal_vector[0]], 'y': [normal_vector[1]], 'z': [normal_vector[2]],
    'u': [normal_vector[0]], 'v': [normal_vector[1]], 'w': [normal_vector[2]]
}
layout = go.Layout(title='Triangle', autosize=True)
figure = go.Figure(data=[trace_triangle, trace_normal_vector, trace_cone], layout=layout)
po.plot(figure, filename='triangle.html')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15194805194805194, 'fraction_numerical': 0.025974025974025976, 'mean_word_length': 2.9844827586206897, 'pattern_counts': {'":': 3, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '76867', 'license': 'MIT', 'n_tokens_mistral': 857, 'n_tokens_neox': 828, 'n_words': 192, 'path': 'volpy/examples/ReadmePlots.ipynb', 'repo_name': 'yohanesnuwara/volpy', 'size': '2310'}