RUVIDEO
Поделитесь видео 🙏

Cell Division Simulation Blender Tutorial

A step by step walkthrough of how to turn one point into a point could through dupilcating cells that grow into the point cloud.
Ran in the simulation branch PR104924
https://builder.blender.org/download/patch/archive/PR104924/

Python Script:

"import plyfile
import math
import numpy as np
import struct

# Read the .ply file
with open('E:\\Point_Clouds\\Sarah_Carving.ply', 'rb') as f:
plydata = plyfile.PlyData.read(f)

# Extract the list of points, colors, and normals from the point cloud data
points = plydata['vertex'].data
colors = plydata['vertex'][['red', 'green', 'blue']]
normals = plydata['vertex'][['nx', 'ny', 'nz']]


cx, cy, cz = 2.550788, -0.026147, 3.191597

# Define a key function that calculates the distance of a point from the center of the point cloud
def radial_sort_key(point, cx, cy, cz):
x, y, z = point['x'], point['y'], point['z']
distance = math.sqrt((x - cx)**2 + (y - cy)**2 + (z - cz)**2)
return distance

# Sort the points based on their distance from the center of the point cloud
sorted_points = sorted(points, key=lambda point: radial_sort_key(point, cx, cy, cz))
sorted_colors = np.array(colors)[np.array([radial_sort_key(point, cx, cy, cz) for point in points]).argsort()]
sorted_normals = np.array(normals)[np.array([radial_sort_key(point, cx, cy, cz) for point in points]).argsort()]

# Open the output file
with open('C:\\Users\\KeirC\\Desktop\\Sarah_Carving_Sorted.ply', 'wb') as f:
# Write the header for the .ply file
f.write(b'ply\nformat ascii 1.0\n')
# Write the vertex element to the output file
vertex_element = 'element vertex {}\n'
f.write(vertex_element.format(len(points)).encode('utf-8'))
f.write(b'property float x\nproperty float y\nproperty float z\n')
f.write(b'property uchar red\nproperty uchar green\nproperty uchar blue\n')
f.write(b'property float nx\nproperty float ny\nproperty float nz\n')
f.write(b'end_header\n')

# Iterate over the sorted points and their associated color and normal data
for point, color, normal in zip(sorted_points, sorted_colors, sorted_normals):
# Write the point data to the output file
f.write('{} {} {} {} {} {} {} {} {}\n'.format(point[0], point[1], point[2], color[0], color[1], color[2], normal[0], normal[1], normal[2]).encode('utf-8'))"

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Cell Division Simulation Blender Tutorial», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.