# Are the coordinate systems of sphere and polyline different?

**URL:** https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548
**Category:** Development
**Created:** [November 2, 2020, 9:35am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548 "2020-11-02T09:35:01Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 2, 2020, 9:35am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/1 "2020-11-02T09:35:01Z")

</div>

![Cap 2020-11-02 18-31-06-398](https://discourse.vtk.org/uploads/default/original/2X/3/3bd97c4edaf7d2c618edb04ce8eec9379e038a70.jpeg)

Hello, I’m a user who just started using VTK.  
A problem occurred while trying to create a line and connect it to the center of the sphere. Here’s what happened:

poly line  
RED ( 0,0,-50 ) ~ ( 5,0,-50 )  
BLUE ( 0,0,-50 ) ~ ( -10,0,-50 )

SPHERE  
origin ( 5,0,-50 ) / ( -5,0,-50)  
radius 5

I think the red line should reach the sphere of gravity (5,0-50), but if you actually render it, it looks like an image.

I looked for the reason, but couldn’t find the exact answer. Does anyone know the answer to this answer?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 4, 2020, 11:57am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/2 "2020-11-04T11:57:43Z")

</div>

Are your spheres from vtkSphereSource, or did you use some other method to create them?

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 6, 2020, 8:14am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/3 "2020-11-06T08:14:17Z")

</div>

thank you for reply!  
please it makes me crazy…

I just use vtkSphereSource and vtkPolyLine.  
Here is my code

{  
// Sphere  
vtkSmartPointer sphereSource = vtkSmartPointer::New();  
sphereSource-\>SetCenter(5, 0, -50);  
sphereSource-\>SetRadius(5);  
// Make the surface smooth.  
sphereSource-\>SetPhiResolution(phi);  
sphereSource-\>SetThetaResolution(theta);

```
// Mapper
vtkSmartPointer<vtkPolyDataMapper> polyDataMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
polyDataMapper->SetInputConnection(sphereSource->GetOutputPort());

vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();

```

// actor-\>SetForceOpaque(false);

```
actor->SetMapper(polyDataMapper);
actor->GetProperty()->SetOpacity(1);
actor->GetProperty()->BackfaceCullingOn();
_modelRenderer->AddActor(actor);
// Target Sphere End

```

}  
{  
double origin[3] = { 0, 0, -50};  
double p0[3] = { 5, 0, -50 };

```
vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
points->InsertNextPoint(origin);
points->InsertNextPoint(p0);

vtkSmartPointer<vtkPolyLine> polyLine = vtkSmartPointer<vtkPolyLine>::New();
polyLine->GetPointIds()->SetNumberOfIds(2);
for (unsigned int i = 0; i < 2; i++)
	polyLine->GetPointIds()->SetId(i, i);

vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();
cells->InsertNextCell(polyLine);

vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();

polyData->SetPoints(points);
polyData->SetLines(cells);

vtkSmartPointer<vtkPolyDataMapper> polyDataMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
polyDataMapper->SetInputData(polyData);

vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();

actor->SetMapper(polyDataMapper);
actor->GetProperty()->SetLineWidth(2);
_modelRenderer->AddActor(actor);

```

}

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 6, 2020, 2:02pm UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/4 "2020-11-06T14:02:15Z")

</div>

Unfortunately your code isn’t displayed properly. Can you edit your post and put all the code into a [“code block”](https://meta.discourse.org/t/how-do-i-select-a-language-in-code-blocks/19247)? Like this:

````
```c++
vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New()
```

````

From what I can read in your code, there is only one sphere, which is different from the image where you show two spheres.

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 1:28am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/5 "2020-11-09T01:28:40Z")

</div>

![캡처.PNG](https://discourse.vtk.org/uploads/default/original/2X/3/34998190e6382974ec3faa133d9f8f2a2c4f8e56.jpeg)

Thank you for reply.

I hope you had a good weekend.  
I am sorry for my immature use of the community, and thank you for your explanation

I’m trying to put the objects I’m going to draw in a vector called “\_modelDataBindInfoVector” and draw them all at once.

```cpp
// Main
AddLine(_renderData, 0, 0, -50, 20, 0, -50, 255, 0, 0);
AddTarget(_renderData, 20 ,0, -50,5, 20, 20);

// AddLine
void AddLine(std::shared_ptr<RenderData> renderData, double startX, double startY, double startZ, double vectorX, double vectorY, double vectorZ, int r, int g, int b)
{
	double origin[3] = { startX, startY, startZ };
	double p0[3] = { vectorX, vectorY, vectorZ };
	
	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
	points->InsertNextPoint(origin);
	points->InsertNextPoint(p0);

	vtkSmartPointer<vtkPolyLine> polyLine = vtkSmartPointer<vtkPolyLine>::New();
	polyLine->GetPointIds()->SetNumberOfIds(2);
	for (unsigned int i = 0; i < 2; i++)
		polyLine->GetPointIds()->SetId(i, i);

	vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();
	cells->InsertNextCell(polyLine);

	vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();

	polyData->SetPoints(points);
	polyData->SetLines(cells);

	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper->SetInputData(polyData);

	vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();

	actor->SetMapper(polyDataMapper);
	actor->GetProperty()->SetColor(r, g, b);
	actor->GetProperty()->SetLineWidth(2);
	actor->SetPosition(0, 0, 0);
	SetStippledLineTexture(actor, 0xAAAA, 1);
	actor->GetProperty()->SetLineStipplePattern(0xf0f0);
	_modelRenderer->AddActor(actor);

	renderData->AddLine(startX, startY, startZ, vectorX, vectorY, vectorZ);
	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetLine(startX, startY, startZ, vectorX, vectorY, vectorZ), actor));
}

// AddTarget
void RenderBox::AddTarget(std::shared_ptr<RenderData> renderData, double centerX, double centerY, double centerZ, double radius, int phi, int theta)
{
	// Target Sphere
	vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New();
	sphereSource->SetCenter(0, 0, 0);
	sphereSource->SetRadius(radius);
	sphereSource->SetPhiResolution(phi);
	sphereSource->SetThetaResolution(theta);
	
	// Mapper
	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper->SetInputConnection(sphereSource->GetOutputPort());

	vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
	actor->SetMapper(polyDataMapper);
	actor->SetPosition(centerX, centerY, centerZ);
	actor->GetProperty()->SetOpacity(0.3);
	actor->GetProperty()->SetColor(1.0, 0, 0);
	actor->GetProperty()->BackfaceCullingOn();
	_modelRenderer->AddActor(actor);
	// Target Sphere End

	// Inner Sphere
	vtkSmartPointer<vtkSphereSource> sphereSource2 = vtkSmartPointer<vtkSphereSource>::New();
	sphereSource2->SetCenter(0, 0, 0);
	sphereSource2->SetRadius(radius * 1.3);
	sphereSource2->SetPhiResolution(phi);
	sphereSource2->SetThetaResolution(theta);

	// Mapper
	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper2 = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper2->SetInputConnection(sphereSource2->GetOutputPort());

	vtkSmartPointer<vtkActor> actor2 = vtkSmartPointer<vtkActor>::New();
	actor2->SetMapper(polyDataMapper2);
	actor2->SetPosition(centerX, centerY, centerZ);
	actor2->GetProperty()->SetOpacity(0.2);
	actor2->GetProperty()->BackfaceCullingOn();

	_modelRenderer->AddActor(actor2);
	// Inner Sphere End

	// Outter Sphere
	vtkSmartPointer<vtkSphereSource> sphereSource3 = vtkSmartPointer<vtkSphereSource>::New();
	sphereSource3->SetCenter(0, 0, 0);
	sphereSource3->SetRadius(radius * 2.0);
	sphereSource3->SetPhiResolution(phi);
	sphereSource3->SetThetaResolution(theta);

	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper3 = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper3->SetInputConnection(sphereSource3->GetOutputPort());
	vtkSmartPointer<vtkActor> actor3 = vtkSmartPointer<vtkActor>::New();
	//	actor3->SetForceOpaque(false);

	actor3->SetPosition(centerX, centerY, centerZ);
	actor3->SetMapper(polyDataMapper3);
	actor3->GetProperty()->SetOpacity(0.1);
	actor3->GetProperty()->BackfaceCullingOn();
	_modelRenderer->AddActor(actor3);

	// Outter Sphere End

	std::array<double, 3> pos = { centerX ,centerY,centerZ };
	renderData->AddTargetSphere(pos,radius);

	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetTargetSphere(pos)[0], actor));
	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetTargetSphere(pos)[1], actor2));
	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetTargetSphere(pos)[2], actor3));
}

```

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 9, 2020, 2:38am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/6 "2020-11-09T02:38:17Z")

</div>

The image as a little hard to see. Can you do a screen grab ([with the “Print Screen” button, for example](https://en.wikipedia.org/wiki/Print_Screen)) instead of taking a picture with your phone?

I don’t think it is a problem with the coordinate systems. The problem is the opacity. The line is hidden because it is inside the sphere, and this might be a bug.

In your original post, the blue line looked correct, but the red line looked wrong. What was the difference between how you drew the red line vs. the blue line?

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 3:04am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/7 "2020-11-09T03:04:05Z")

</div>

![Cap 2020-11-09 12-01-34-770](https://discourse.vtk.org/uploads/default/original/2X/2/209bac6fc751fd716964de690fd8ab4c71dd03bc.jpeg)

Thank you for your kind attention.  
Radius x 1 in the red center circle.  
The outer circle has Radius x 1.3 and Radius x 2 respectively.

The blue line is twice as long as the red line. The coordinates are marked on the code.

```cpp
AddLine(_renderData, 0, 0, -50, 20, 0, -50, 255, 0, 0); 
AddTarget(_renderData, 20 ,0, -50,5, 20, 20);          

AddLine(_renderData, 0, 0, -50, -40, 0, -50, 0, 0, 255);
AddTarget(_renderData, -20, 0, -50, 5, 20, 20);

```

If you look at the blue line, it doesn’t look like the line is covered by the skin. So it’s even more confusing.

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 9, 2020, 3:16am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/8 "2020-11-09T03:16:42Z")

</div>

I see. It’s as if only half of the line is drawn. What happens if you do not stipple the line? Maybe the stipple is causing problems with the rendering.

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 3:20am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/9 "2020-11-09T03:20:17Z")

</div>

![Cap 2020-11-09 12-18-19-029](https://discourse.vtk.org/uploads/default/original/2X/3/39d57b46f5edcfb337cb1d9ada334f27b3f8f819.jpeg)

I’m glad you understood. Thank you.

The other parts are all the same and only the stipple sections are annotated.  
The length of the line does not seem to change.

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 9, 2020, 3:24am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/10 "2020-11-09T03:24:35Z")

</div>

As a test, try converting the polyline into a polygonal tube with [vtkTubeFilter](https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/TubeFilter/). If the problem disappears with vtkTubeFilter, then it is definitely a problem with rendering lines.

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 3:26am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/11 "2020-11-09T03:26:52Z")

</div>

Okay, I’ll test it right away. Thank you.

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 3:40am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/12 "2020-11-09T03:40:00Z")

</div>

![Cap 2020-11-09 12-35-30-367](https://discourse.vtk.org/uploads/default/original/2X/7/73d6e3c062d23670f31587ae0df3883d70a68df2.jpeg)

Unfortunately, there seems to be no difference in length.

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 9, 2020, 3:45am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/13 "2020-11-09T03:45:19Z")

</div>

That doesn’t look like the output of vtkTubeFilter. Please make sure the output from vtkTubeFilter goes into the mapper.

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 6:17am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/14 "2020-11-09T06:17:18Z")

</div>

![Cap 2020-11-09 15-11-21-494](https://discourse.vtk.org/uploads/default/original/2X/7/7aa8740abd2d78dd5192817b92949212cab7855e.jpeg)

I did what you said. But the problem that happened doesn’t seem to have been solved.

---

<div class="post-metadata">

### Author: ![clolent](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@clolent](https://discourse.vtk.org/u/clolent)
#### Post date: [November 9, 2020, 6:21am UTC](https://discourse.vtk.org/t/are-the-coordinate-systems-of-sphere-and-polyline-different/4548/15 "2020-11-09T06:21:55Z")

</div>

![Cap 2020-11-09 15-17-39-318](https://discourse.vtk.org/uploads/default/original/2X/e/e0ba00def54630c13344a363b3e39de866dc2383.jpeg) Look at this.  
In the existing code, Line and Sphere were created by putting them all in a function, not separately.  
That’s how the picture was drawn, as intended. But I still don’t know why this is happening.

```cpp
AddLine(_renderData, 0, 0, -50, 10, 0, -50, 255, 0, 0);

void RenderBox::AddLine(std::shared_ptr<RenderData> renderData, double startX, double startY, double startZ, double vectorX, double vectorY, double vectorZ, int r, int g, int b)
{
	// Target Sphere
	vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New();
	sphereSource->SetCenter(startX, startY, startZ);
	sphereSource->SetRadius(5);
	sphereSource->SetPhiResolution(40);
	sphereSource->SetThetaResolution(20);

	// Mapper
	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper0 = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper0->SetInputConnection(sphereSource->GetOutputPort());

	vtkSmartPointer<vtkActor> actor0 = vtkSmartPointer<vtkActor>::New();
	actor0->SetMapper(polyDataMapper0);
	actor0->SetPosition(0, 0, 0);
	actor0->GetProperty()->SetOpacity(0.3);
	actor0->GetProperty()->SetColor(1.0, 0, 0);
	actor0->GetProperty()->BackfaceCullingOn();
	_modelRenderer->AddActor(actor0);
	// Target Sphere End

	// Inner Sphere
	vtkSmartPointer<vtkSphereSource> sphereSource2 = vtkSmartPointer<vtkSphereSource>::New();
	sphereSource2->SetCenter(startX, startY, startZ);
	sphereSource2->SetRadius(5 * 1.3);
	sphereSource2->SetPhiResolution(40);
	sphereSource2->SetThetaResolution(20);

	// Mapper
	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper2 = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper2->SetInputConnection(sphereSource2->GetOutputPort());

	vtkSmartPointer<vtkActor> actor2 = vtkSmartPointer<vtkActor>::New();
	actor2->SetMapper(polyDataMapper2);
	actor2->SetPosition(0,0,0);
	actor2->GetProperty()->SetOpacity(0.2);
	actor2->GetProperty()->BackfaceCullingOn();

	_modelRenderer->AddActor(actor2);
	// Inner Sphere End

	// Outter Sphere
	vtkSmartPointer<vtkSphereSource> sphereSource3 = vtkSmartPointer<vtkSphereSource>::New();
	sphereSource3->SetCenter(startX, startY, startZ);
	sphereSource3->SetRadius(5 * 2.0);
	sphereSource3->SetPhiResolution(40);
	sphereSource3->SetThetaResolution(20);

	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper3 = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper3->SetInputConnection(sphereSource3->GetOutputPort());
	vtkSmartPointer<vtkActor> actor3 = vtkSmartPointer<vtkActor>::New();

	actor3->SetPosition(0,0,0);
	actor3->SetMapper(polyDataMapper3);
	actor3->GetProperty()->SetOpacity(0.1);
	actor3->GetProperty()->BackfaceCullingOn();
	_modelRenderer->AddActor(actor3);

	// Outter Sphere End

	std::array<double, 3> pos = { startX ,startY,startZ };
	renderData->AddTargetSphere(pos, 5);

	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetTargetSphere(pos)[0], actor0));
	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetTargetSphere(pos)[1], actor2));
	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetTargetSphere(pos)[2], actor3));

	double origin[3] = { startX, startY, startZ };
	double p0[3] = { vectorX, vectorY, vectorZ };
	
	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
	points->InsertNextPoint(origin);
	points->InsertNextPoint(p0);

	vtkSmartPointer<vtkPolyLine> polyLine = vtkSmartPointer<vtkPolyLine>::New();
	polyLine->GetPointIds()->SetNumberOfIds(2);
	for (unsigned int i = 0; i < 2; i++)
		polyLine->GetPointIds()->SetId(i, i);

	vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();
	cells->InsertNextCell(polyLine);

	vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();

	polyData->SetPoints(points);
	polyData->SetLines(cells);

	vtkSmartPointer<vtkPolyDataMapper> polyDataMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
	polyDataMapper->SetInputData(polyData);

	vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
	actor->SetMapper(polyDataMapper);
	actor->GetProperty()->SetColor(r, g, b);
	actor->GetProperty()->SetLineWidth(2);
	actor->SetPosition(0, 0, 0);
	//	SetStippledLineTexture(actor, 0xAAAA, 1);
		_modelRenderer->AddActor(actor);
	renderData->AddLine(startX, startY, startZ, vectorX, vectorY, vectorZ);
	_modelDataBindInfoVector.emplace_back(std::pair<std::weak_ptr<RenderData::ObjectData>, vtkSmartPointer<vtkActor>>(renderData->GetLine(startX, startY, startZ, vectorX, vectorY, vectorZ), actor));
}

```

 ![캡처](https://discourse.vtk.org/uploads/default/original/2X/0/04dd30b4fa201a3578195a31df60aaf260ccad6a.png)
