BallFretting Download (Updated 2022)
– Get the ball jitter radius and the points cloud size, defining the maxium number of tetraedrons in the cloud.
– Using the Delaunay triangulator we are going to construct a set of tetraedrons
– Which will be called in a first stage the ball fretting triangulation.
– The ball triangulation is a set of triangles within the tetraedron, which
– Will be used as control points in the next stage.
– In the second stage the triangulation is scattered inside the tetraedron to
– Create a manifold.
– Using a recursive function the points cloud is scattering inside the
– Surface formed by the triangulation.
– The control points are extract from the tetraedron ball and used to create
– the FrettingSurface mesh and its normal vector.
The format is nx4 array representing tetraedrons.
# Use an un-tesselated cloud
>>> tetr=[ for i in range(1,10)]
>>> p=[ for i in range(10)]
>>> t=[ for i in range(100)]
>>> for i in range(1,10):
>>> normals=numpy.array([[-numpy.sin(numpy.radians(0.732*i))*0.1+0.2*numpy.cos(numpy.radians(0.732*i)) for i in range(10)] for i in range(10)])
>>> tnorm=[numpy.zeros(10,dtype=numpy.float32) for i in range(10)]
>>> for j in range(10):
… for i in range(len(t)):
Input the number of tetrahedrons. “tetr”: nx4 array, the initial set of tetrahedrons to include in the triangulation, or a delaunay triangulation.
Output the surface expressed by the tetrahedrons in vector form
Calculate the Delaunay triangulation of the tetrahedrons in “tetr”.
Create a simple grid which we use to build a ball fretting.”ForEach Tri” (build ball fretting):
1. Create a ball nx3 array (the center of the ball) nx3 array (the radius of the ball) nx3 array (the normals of the ball)
2. For every triangle included in the triangulation, calculate the distance between the center of the ball and the triangle’s surface, and invert the result to obtain the tangent of the ball’s surface.
When the function is finished, you have a surface. The script returns the surface as a numpy.array in the right shape. “t” contains the number of triangles in each tetrahedron. “norms” contains the norms of the normals, to create the fretting.
From this surface, we can retrude the tetrahedrons from “t”. These tetrahedrons express the ball frets, but they need some smoothing. We use the scipy package “prune” for this smoothing. This script assumes that “p” is a constant, 3D set of points, but it is in fact a set of a few tetrahedrons:
#prune – points to remove from the surface
“prune” and “points” are both vectors, we don’t need to specify their size.
“prune” is a vector of length 10, where 0 means that we will remove a certain number of tetrahedrons from the tetrahedron cloud.
“points” is the constant 3D set of points.
the tetrahedron cloud after pruning
BallFretting Full Version Free Download
tets is the tetrahedron mesh. It is used to compute the ball pressure and the ball bearing according to the number of triangles it contains.
p is a 3D array of point and the size of the array is nx3 where each entry represents the coordinates of a point.
r is the radius of the ball fretting in meters.
t is a triangles array and has the same size of the tetrahedron mesh. The triangles are oriented outwards from the center of the tetrahedron.
tnorm is the array of normals of the triangles with outwards orientation.
The outwards oriented triangles tet list.
Explanation of the parameters:
nx4 array tets
Each entry nx4 represent a tetrahedron index (4 corners of the tetrahedron). You need to call a delaunay triangulator (if necessary) to compute them.
This array represent the mesh of the fretting region.
p: nx3 array of point, each entry point represents a point in the mesh of the fretting region.
r: the only parameter of the algorithm, the radius of the fretting ball
t: triangles ids, nx3 array of triangles ids, each entry triangle id represents the tetrahedron ids of the triangles belonging to the tetrahedron. The triangles are oriented outwards from the center of the tetrahedron.
tnorm: array of normals of the triangles with outwards orientation
This array contains the orientation of the triangles belonging to the tetrahedron mesh.
Comparison with the BallPivoting Algorithm
The ballpivoting algorithm don’t requires a ball mesh. The two algorithms only differ when the input is not a tetrahedron mesh (inputs could be triangles, cubes or hexahedrons).
In this case, the ballpivoting algorithm only needs to compute the radius of the ball. The ballpivoting will compute a ball mesh and find all the tetrahedrons it intersects. The ballpivoting algorithm will provide the normal vector of the surface and the distance from the ball to each vertice.
The ballpivoting algorithm is much faster than the ball fretting algorithm when the input is not a tetrahedron mesh and when the ballpivoting algorithm provides the normal vector of the surface.
What’s New in the?
The ball fretting can be seen as a simplification of the ballpivoting algorithm. The first step of the ballpivoting algorithm (see for details) is to construct a ball where the normals of the surface would be inwards to the ball. With this interpretation one can imagine the ball (blue) as an object that is eating the cloud of points (green). The ball is non perturbing and this is the reason why the output of the ball fretting will be a manifold surface.
The file contains a commented code in order to provide with examples of usage.
You could make a simple vertex stream that has a start and end time and a position. The start time and position of the vertex when the stream starts or finishes is saved to a list. You can then render the stream using bpy.ops.wm.stream_lines_add(…) to get the outline of the ball.
Then set the stream to repeat forever and set the stream size to be as big as the ball so you get a line loop.
scene = bpy.context.scene
context = bpy.context
def verts_to_loop(pos, normals):
# remove the original vertex before add_loops(…)
for v in context.active_object.data.vertices:
if (v.normal == normals):
v.index -= 1
points = [(random.uniform(-max_size, max_size),
random.uniform(-max_size, max_size)) for i in range(0, max_size)]
System Requirements For BallFretting:
OS: Windows 10 / Windows Server 2012 R2
CPU: Core 2 Duo @ 2.4 GHz
Memory: 4 GB
DirectX: Version 11
Network: Broadband Internet connection
HDD: 16 GB
Video Card: ATI Radeon HD 2600 or Nvidia Geforce 7800 series
Input Devices: Keyboard and mouse
English / French
German / Italian
Spanish / Latin American
Polish / Russian