# [vtkusers] Points inside a Cylinder

Saeed Bakhshmand saeedbakhshmand at gmail.com
Tue Dec 6 13:14:45 EST 2016

```Thanks Chiranjib,

I was trying to avoid an implementation as you described, also boundary
condition for a constrained cylinder mathematically is not straightforward.
I will keep you posted once I solve this.

Cheers,
Saeed

On Tue, Dec 6, 2016 at 12:49 PM, Chiranjib Sur <sur.chiranjib at gmail.com>
wrote:

> Saeed,
> there is no ready made solution available ( atleast I am not aware of).
> You can implement the solution in the following way
>
> 1. Consider the cylinder is within a cubic volume for which you know the
> bounds
> 2. Generate points of your desired resolution on a 3d grid for the entire
> cube (this will be on a regular grid)
> 3. Consider the boundary condition for cylinder and create an array of
> "vtkpoints" after step 2
> 4. This boundary condition can give you option to create point inside or
>
> Here is an example which you can look   to understand how to determine
> inside outside of the closed surface
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject
>
> Hope that helps,
> Chiranjib
>
> On Tue, Dec 6, 2016 at 10:15 PM, Saeed Bakhshmand <
> saeedbakhshmand at gmail.com> wrote:
>
>> Hello,
>>
>> I am trying to generate a list of points that lay inside an object (such
>> as cylinder) and have no success finding the right method and would
>> appreciate any hints.
>>
>> Best,
>> Saeed
>>
>> _______________________________________________
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>