Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > Web программирование > HTML и CSS
Регистрация

Восстановить пароль

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 17.11.2024, 15:13   #191
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Коридорный многоэтажный хаос
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from skimage import measure
import os

# Функция для генерации 3D-поля с коридорами
def generate_field(shape):
    array = np.zeros(shape, dtype=float)

    # Генерация точек для коридоров
    points = []
    for _ in range(100):
        x = np.random.randint(10, shape[0] - 10)
        y = np.random.randint(10, shape[1] - 10)
        z = np.random.randint(10, shape[2] - 10)
        points.append([x, y, z])  # Генерируем точки

    # Генерация коридоров между точками
    for i in range(len(points) - 1):
        start_point = points[i]
        end_point = points[i + 1]

        # Горизонтальный или вертикальный коридор
        if abs(start_point[0] - end_point[0]) > abs(start_point[1] - end_point[1]) and abs(start_point[0] - end_point[0]) > abs(start_point[2] - end_point[2]):
            for new_x in range(min(start_point[0], end_point[0]), max(start_point[0], end_point[0]) + 1):
                new_y = start_point[1]
                new_z = start_point[2]
                array[new_x, new_y, new_z] = 1.0
                # Делаем коридоры более жирными
                for k in range(-2, 3):
                    for l in range(-2, 3):
                        for m in range(-2, 3):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0
        elif abs(start_point[1] - end_point[1]) > abs(start_point[0] - end_point[0]) and abs(start_point[1] - end_point[1]) > abs(start_point[2] - end_point[2]):
            for new_y in range(min(start_point[1], end_point[1]), max(start_point[1], end_point[1]) + 1):
                new_x = start_point[0]
                new_z = start_point[2]
                array[new_x, new_y, new_z] = 1.0
                # Делаем коридоры более жирными
                for k in range(-2, 3):
                    for l in range(-2, 3):
                        for m in range(-2, 3):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0
        else:
            for new_z in range(min(start_point[2], end_point[2]), max(start_point[2], end_point[2]) + 1):
                new_x = start_point[0]
                new_y = start_point[1]
                array[new_x, new_y, new_z] = 1.0
                # Делаем коридоры более жирными
                for k in range(-2, 3):
                    for l in range(-2, 3):
                        for m in range(-2, 3):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0

    return array

# Параметры
shape = (128, 128, 128)  # Размеры 3D массива

# Генерация 3D-поля с коридорами
field = generate_field(shape=(128, 128, 128))

# Создание изосурфейса
verts, faces, _, _ = measure.marching_cubes(field, level=0.5)

# Создание mesh с острыми углами
mesh = trimesh.Trimesh(vertices=verts, faces=faces)

# Сохранение mesh на рабочий стол
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "mesh.stl")
mesh.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(mesh.vertices[:, 0], mesh.vertices[:, 1], mesh.vertices[:, 2], color='r', alpha=0.5)
plt.show()

Последний раз редактировалось MakarovDs; 17.11.2024 в 15:42.
MakarovDs вне форума Ответить с цитированием
Старый 18.11.2024, 09:52   #192
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Процедурный генератор лёсов
Код:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from skimage import measure
from scipy.spatial import Delaunay
import os

def generate_delaunay_field(shape, num_cubes, distance):
    array = np.zeros(shape, dtype=float)

    points = []
    for i in range(num_cubes):
        x = (i % 4) * distance + distance // 2
        y = ((i // 4) % 4) * distance + distance // 2
        z = (i // 16) * distance + distance // 2
        if x < shape[0] and y < shape[1] and z < shape[2]:
            points.append([x, y, z])

    for i in range(len(points)):
        x, y, z = points[i]
        for j in range(shape[0]):
            new_x = j
            new_y = y
            new_z = z
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                array[new_x, new_y, new_z] = 1.0
        for j in range(shape[1]):
            new_x = x
            new_y = j
            new_z = z
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                array[new_x, new_y, new_z] = 1.0
        for j in range(shape[2]):
            new_x = x
            new_y = y
            new_z = j
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                array[new_x, new_y, new_z] = 1.0

    for i in range(len(points) - 1):
        dx = points[i+1][0] - points[i][0]
        dy = points[i+1][1] - points[i][1]
        dz = points[i+1][2] - points[i][2]
        length = max(abs(dx), abs(dy), abs(dz))

        if abs(dx) > abs(dy) and abs(dx) > abs(dz):
            for j in range(abs(dx)):
                new_x = int(points[i][0] + j * np.sign(dx))
                new_y = points[i][1]
                new_z = points[i][2]
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    array[new_x, new_y, new_z] = 1.0
            for j in range(abs(dz)):
                new_x = new_x
                new_y = new_y
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    array[new_x, new_y, new_z] = 1.0
        elif abs(dy) > abs(dx) and abs(dy) > abs(dz):
            for j in range(abs(dy)):
                new_x = points[i][0]
                new_y = int(points[i][1] + j * np.sign(dy))
                new_z = points[i][2]
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    array[new_x, new_y, new_z] = 1.0
            for j in range(abs(dz)):
                new_x = new_x
                new_y = new_y
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    array[new_x, new_y, new_z] = 1.0
        else:
            for j in range(abs(dz)):
                new_x = points[i][0]
                new_y = points[i][1]
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    array[new_x, new_y, new_z] = 1.0

    return array

shape = (64, 64, 64)
num_cubes = 50
distance = 20

delaunay_field = generate_delaunay_field(shape, num_cubes, distance)

verts, faces, _, _ = measure.marching_cubes(delaunay_field, level=0.5)

desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "delaunay.obj")
with open(filename, "w") as f:
    for j, vert in enumerate(verts):
        f.write(f"v {vert[0]} {vert[1]} {vert[2]}\n")
    for face in faces:
        f.write(f"f {face[0]+1} {face[1]+1} {face[2]+1}\n")
print(f"Model saved as {filename}")

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(verts[:, 0], verts[:, 1], verts[:, 2], color='blue', alpha=0.5)
plt.show()
MakarovDs вне форума Ответить с цитированием
Старый 18.11.2024, 10:41   #193
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Сломанное здание 2
Код:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from skimage import measure
from scipy.spatial import Delaunay
import os

def generate_delaunay_field(shape, num_cubes, distance):
    array = np.zeros(shape, dtype=float)

    points = []
    for i in range(num_cubes):
        x = (i % 4) * distance + distance // 2
        y = ((i // 4) % 4) * distance + distance // 2
        z = (i // 16) * distance + distance // 2
        if x < shape[0] and y < shape[1] and z < shape[2]:
            points.append([x, y, z])

    for i in range(len(points)):
        x, y, z = points[i]
        for j in range(shape[0]):
            new_x = j
            new_y = y
            new_z = z
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                for k in range(-2, 3):
                    for l in range(-2, 3):
                        for m in range(-2, 3):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0
        for j in range(shape[1]):
            new_x = x
            new_y = j
            new_z = z
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                for k in range(-2, 3):
                    for l in range(-2, 3):
                        for m in range(-2, 3):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0
        for j in range(shape[2]):
            new_x = x
            new_y = y
            new_z = j
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                for k in range(-2, 3):
                    for l in range(-2, 3):
                        for m in range(-2, 3):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0

    for i in range(len(points) - 1):
        dx = points[i+1][0] - points[i][0]
        dy = points[i+1][1] - points[i][1]
        dz = points[i+1][2] - points[i][2]
        length = max(abs(dx), abs(dy), abs(dz))

        if abs(dx) > abs(dy) and abs(dx) > abs(dz):
            for j in range(abs(dx)):
                new_x = int(points[i][0] + j * np.sign(dx))
                new_y = points[i][1]
                new_z = points[i][2]
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-2, 3):
                        for l in range(-2, 3):
                            for m in range(-2, 3):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
            for j in range(abs(dz)):
                new_x = new_x
                new_y = new_y
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-2, 3):
                        for l in range(-2, 3):
                            for m in range(-2, 3):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
        elif abs(dy) > abs(dx) and abs(dy) > abs(dz):
            for j in range(abs(dy)):
                new_x = points[i][0]
                new_y = int(points[i][1] + j * np.sign(dy))
                new_z = points[i][2]
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-2, 3):
                        for l in range(-2, 3):
                            for m in range(-2, 3):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
            for j in range(abs(dz)):
                new_x = new_x
                new_y = new_y
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-2, 3):
                        for l in range(-2, 3):
                            for m in range(-2, 3):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
        else:
            for j in range(abs(dz)):
                new_x = points[i][0]
                new_y = points[i][1]
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-2, 3):
                        for l in range(-2, 3):
                            for m in range(-2, 3):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0

    return array

shape = (64, 64, 64)
num_cubes = 50
distance = 20

delaunay_field = generate_delaunay_field(shape, num_cubes, distance)

verts, faces, _, _ = measure.marching_cubes(delaunay_field, level=0.5)

desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "delaunay.obj")
with open(filename, "w") as f:
    for j, vert in enumerate(verts):
        f.write(f"v {vert[0]} {vert[1]} {vert[2]}\n")
    for face in faces:
        f.write(f"f {face[0]+1} {face[1]+1} {face[2]}\n")
print(f"Model saved as {filename}")

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(verts[:, 0], verts[:, 1], verts[:, 2], color='blue', alpha=0.5)
plt.show()
MakarovDs вне форума Ответить с цитированием
Старый 18.11.2024, 10:53   #194
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Исправим ЭтОт НеДоСтАтОк
Код:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from skimage import measure
from scipy.spatial import Delaunay
import os

def generate_delaunay_field(shape, num_cubes, distance):
    array = np.zeros(shape, dtype=float)

    points = []
    for i in range(num_cubes):
        x = (i % 4) * distance + distance // 2
        y = ((i // 4) % 4) * distance + distance // 2
        z = (i // 16) * distance + distance // 2
        if x < shape[0] and y < shape[1] and z < shape[2]:
            points.append([x, y, z])

    for i in range(len(points)):
        x, y, z = points[i]
        for j in range(shape[0]):
            new_x = j
            new_y = y
            new_z = z
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                for k in range(-5, 6):
                    for l in range(-5, 6):
                        for m in range(-5, 6):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0
        for j in range(shape[1]):
            new_x = x
            new_y = j
            new_z = z
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                for k in range(-5, 6):
                    for l in range(-5, 6):
                        for m in range(-5, 6):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0
        for j in range(shape[2]):
            new_x = x
            new_y = y
            new_z = j
            if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                for k in range(-5, 6):
                    for l in range(-5, 6):
                        for m in range(-5, 6):
                            x1, y1, z1 = new_x + k, new_y + l, new_z + m
                            if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                array[x1, y1, z1] = 1.0

    for i in range(len(points) - 1):
        dx = points[i+1][0] - points[i][0]
        dy = points[i+1][1] - points[i][1]
        dz = points[i+1][2] - points[i][2]
        length = max(abs(dx), abs(dy), abs(dz))

        if abs(dx) > abs(dy) and abs(dx) > abs(dz):
            for j in range(abs(dx)):
                new_x = int(points[i][0] + j * np.sign(dx))
                new_y = points[i][1]
                new_z = points[i][2]
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-5, 6):
                        for l in range(-5, 6):
                            for m in range(-5, 6):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
            for j in range(abs(dz)):
                new_x = new_x
                new_y = new_y
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-5, 6):
                        for l in range(-5, 6):
                            for m in range(-5, 6):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
        elif abs(dy) > abs(dx) and abs(dy) > abs(dz):
            for j in range(abs(dy)):
                new_x = points[i][0]
                new_y = int(points[i][1] + j * np.sign(dy))
                new_z = points[i][2]
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-5, 6):
                        for l in range(-5, 6):
                            for m in range(-5, 6):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
            for j in range(abs(dz)):
                new_x = new_x
                new_y = new_y
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-5, 6):
                        for l in range(-5, 6):
                            for m in range(-5, 6):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0
        else:
            for j in range(abs(dz)):
                new_x = points[i][0]
                new_y = points[i][1]
                new_z = int(points[i][2] + j * np.sign(dz))
                if 0 <= new_x < shape[0] and 0 <= new_y < shape[1] and 0 <= new_z < shape[2]:
                    for k in range(-5, 6):
                        for l in range(-5, 6):
                            for m in range(-5, 6):
                                x1, y1, z1 = new_x + k, new_y + l, new_z + m
                                if 0 <= x1 < shape[0] and 0 <= y1 < shape[1] and 0 <= z1 < shape[2]:
                                    array[x1, y1, z1] = 1.0

    return array

shape = (64, 64, 64)
num_cubes = 50
distance = 20

delaunay_field = generate_delaunay_field(shape, num_cubes, distance)

verts, faces, _, _ = measure.marching_cubes(delaunay_field, level=0.5)

desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "delaunay.obj")
with open(filename, "w") as f:
    for j, vert in enumerate(verts):
        f.write(f"v {vert[0]} {vert[1]} {vert[2]}\n")
    for face in faces:
        f.write(f"f {face[0]+1} {face[1]+1} {face[2]+1}\n")
print(f"Model saved as {filename}")

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(verts[:, 0], verts[:, 1], verts[:, 2], color='blue', alpha=0.5)
plt.show()
MakarovDs вне форума Ответить с цитированием
Старый 18.11.2024, 13:57   #195
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Помещение с дырками
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
import os

def generate_room():
    # Определите размеры комнаты
    width = 100
    height = 2
    depth = 100

    # Определите вершины комнаты
    vertices = [
        [0, 0, 0],
        [width, 0, 0],
        [width, 0, depth],
        [0, 0, depth],
        [0, height, 0],
        [width, height, 0],
        [width, height, depth],
        [0, height, depth]
    ]

    # Определите грани комнаты
    faces = [
        [0, 1, 2, 3],
        [4, 5, 6, 7],
        [0, 1, 5, 4],
        [1, 2, 6, 5],
        [2, 3, 7, 6],
        [3, 0, 4, 7]
    ]

    mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))
    return mesh

def generate_cubes_field(shape, num_cubes):
    array = np.ones(shape, dtype=float)
    # Генерируем кубы внутри куба
    for _ in range(num_cubes):
        # Выбираем случайную позицию на верхней стороне
        x = np.random.randint(0, shape[0])
        y = np.random.randint(0, shape[1])
        z = np.random.randint(0, shape[2])
        # Генерируем куб, который проходит от верхней стороны к нижней стороне
        for i in range(max(0, x-1), min(shape[0], x+2)):
            for j in range(max(0, y-1), min(shape[1], y+2)):
                for k in range(max(0, z-1), min(shape[2], z+2)):
                    if abs(i - x) <= 1 and abs(j - y) <= 1 and abs(k - z) <= 1:
                        array[i, j, k] = 0.0
    return array

# Генерация комнаты
room = generate_room()

# Генерация массива с дырками
array = generate_cubes_field((100, 100, 2), 100)

# Создание меша с дырками
vertices = []
faces = []
for i in range(array.shape[0]):
    for j in range(array.shape[1]):
        for k in range(array.shape[2]):
            if array[i, j, k] == 1:
                vertices.extend([
                    [i, j, k],
                    [i+1, j, k],
                    [i+1, j+1, k],
                    [i, j+1, k],
                    [i, j, k+1],
                    [i+1, j, k+1],
                    [i+1, j+1, k+1],
                    [i, j+1, k+1]
                ])
                faces.extend([
                    [len(vertices)-8, len(vertices)-7, len(vertices)-6, len(vertices)-5],
                    [len(vertices)-4, len(vertices)-3, len(vertices)-2, len(vertices)-1],
                    [len(vertices)-8, len(vertices)-7, len(vertices)-3, len(vertices)-4],
                    [len(vertices)-7, len(vertices)-6, len(vertices)-2, len(vertices)-3],
                    [len(vertices)-6, len(vertices)-5, len(vertices)-1, len(vertices)-2],
                    [len(vertices)-5, len(vertices)-4, len(vertices)-8, len(vertices)-1]
                ])

mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))

# Сохранение изосурфейса в OBJ файл
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "room_with_holes.obj")
mesh.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.add_collection3d(mesh)
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
ax.set_zlim(0, 2)
plt.show()

Последний раз редактировалось MakarovDs; 19.11.2024 в 10:22.
MakarovDs вне форума Ответить с цитированием
Старый 19.11.2024, 10:49   #196
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Теперь это уже полноценное помещение со столбами
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
import os

def generate_room_with_holes(width, height, depth, num_holes):
    # Определите вершины комнаты
    vertices = [
        [0, 0, 0],
        [width, 0, 0],
        [width, 0, depth],
        [0, 0, depth],
        [0, height, 0],
        [width, height, 0],
        [width, height, depth],
        [0, height, depth]
    ]

    # Определите грани комнаты
    faces = [
        [0, 1, 2],
        [0, 2, 3],
        [4, 5, 6],
        [4, 6, 7],
        [0, 1, 5],
        [0, 5, 4],
        [1, 2, 6],
        [1, 6, 5],
        [2, 3, 7],
        [2, 7, 6],
        [3, 0, 4],
        [3, 4, 7]
    ]

    # Генерируем дырки внутри комнаты
    for _ in range(num_holes):
        # Выбираем случайную позицию на верхней стороне
        x = np.random.randint(0, width - 2)  # оставляем 2 единицы для ширины дырки
        y = np.random.randint(0, depth - 2)  # оставляем 2 единицы для глубины дырки

        # Генерируем дырку, которая проходит от потолка к потолку по уровню
        if x > 0 and x < width and y > 0 and y < depth:
            cube_verts = np.array([
                [x - 1, 0, y - 1],
                [x + 1, 0, y - 1],
                [x + 1, 0, y + 1],
                [x - 1, 0, y + 1],
                [x - 1, height, y - 1],
                [x + 1, height, y - 1],
                [x + 1, height, y + 1],
                [x - 1, height, y + 1]
            ])

            cube_faces = np.array([
                [0, 1, 2],
                [0, 2, 3],
                [4, 5, 6],
                [4, 6, 7],
                [0, 1, 5],
                [0, 5, 4],
                [1, 2, 6],
                [1, 6, 5],
                [2, 3, 7],
                [2, 7, 6],
                [3, 0, 4],
                [3, 4, 7]
            ])

            # Добавляем вершины и грани куба в общий список
            vertices.extend(cube_verts.tolist())
            faces.extend(cube_faces + len(vertices) - 8)

    mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))
    return mesh

# Генерация комнаты с дырками
room = generate_room_with_holes(100, 10, 100, 100)

# Сохранение изосурфейса в OBJ файл
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "room_with_holes.obj")
room.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.add_collection3d(room)
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
ax.set_zlim(0, 10)
plt.show()

Последний раз редактировалось MakarovDs; 19.11.2024 в 13:20.
MakarovDs вне форума Ответить с цитированием
Старый 19.11.2024, 13:20   #197
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Вот теперь это не столбы а стены
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
import os

def generate_room_with_holes(width, height, depth, num_holes):
    # Определите вершины комнаты
    vertices = [
        [0, 0, 0],
        [width, 0, 0],
        [width, 0, depth],
        [0, 0, depth],
        [0, height, 0],
        [width, height, 0],
        [width, height, depth],
        [0, height, depth]
    ]

    # Определите грани комнаты
    faces = [
        [0, 1, 2],
        [0, 2, 3],
        [4, 5, 6],
        [4, 6, 7],
        [0, 1, 5],
        [0, 5, 4],
        [1, 2, 6],
        [1, 6, 5],
        [2, 3, 7],
        [2, 7, 6],
        [3, 0, 4],
        [3, 4, 7]
    ]

    # Генерируем дырки внутри комнаты
    for _ in range(num_holes):
        # Выбираем случайную позицию на верхней стороне
        x = np.random.randint(0, width - 2)  # оставляем 2 единицы для ширины дырки
        y = np.random.randint(0, depth - 2)  # оставляем 2 единицы для глубины дырки

        # Генерируем дырку, которая проходит от потолка к потолку по уровню
        if x > 0 and x < width and y > 0 and y < depth:
            # Случайно растягиваем дырку по x
            dx = np.random.randint(1, 10)
            cube_verts = np.array([
                [x - 1, 0, y - 1],
                [x + 1 + dx, 0, y - 1],
                [x + 1 + dx, 0, y + 1],
                [x - 1, 0, y + 1],
                [x - 1, height, y - 1],
                [x + 1 + dx, height, y - 1],
                [x + 1 + dx, height, y + 1],
                [x - 1, height, y + 1]
            ])

            cube_faces = np.array([
                [0, 1, 2],
                [0, 2, 3],
                [4, 5, 6],
                [4, 6, 7],
                [0, 1, 5],
                [0, 5, 4],
                [1, 2, 6],
                [1, 6, 5],
                [2, 3, 7],
                [2, 7, 6],
                [3, 0, 4],
                [3, 4, 7]
            ])

            # Добавляем вершины и грани куба в общий список
            vertices.extend(cube_verts.tolist())
            faces.extend(cube_faces + len(vertices) - 8)

    mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))
    return mesh

# Генерация комнаты с дырками
room = generate_room_with_holes(100, 10, 100, 100)

# Сохранение изосурфейса в OBJ файл
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")
filename = os.path.join(desktop_path, "room_with_holes.obj")
room.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.add_collection3d(room)
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
ax.set_zlim(0, 10)
plt.show()

Последний раз редактировалось MakarovDs; 19.11.2024 в 13:30.
MakarovDs вне форума Ответить с цитированием
Старый 20.11.2024, 11:09   #198
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Сломанный лабиринт
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
import os
import random

def start_point_generate(n, m):
    """Функция выбора точки начала лабиринта"""
    if random.choice([True, False]):
        if random.choice([True, False]):
            start = (0, random.randint(0, m - 1))
        else:
            start = (n - 1, random.randint(0, m - 1))
    else:
        if random.choice([True, False]):
            start = (random.randint(0, n - 1), 0)
        else:
            start = (random.randint(0, n - 1), m - 1)
    return start

def finish_point_generate(start, n, m):
    """Выбор точки конца лабиринта"""
    return n - 1 - start[0], m - 1 - start[1]

def transition_choice(x, y, rm):
    """Функция выбора дальнейшего пути в генерации лабиринта"""
    choice_list = []
    if x > 0:
        if not rm[x - 1][y]:
            choice_list.append((x - 1, y))
    if x < len(rm) - 1:
        if not rm[x + 1][y]:
            choice_list.append((x + 1, y))
    if y > 0:
        if not rm[x][y - 1]:
            choice_list.append((x, y - 1))
    if y < len(rm[0]) - 1:
        if not rm[x][y + 1]:
            choice_list.append((x, y + 1))
    if choice_list:
        nx, ny = random.choice(choice_list)
        if x == nx:
            if ny > y:
                tx, ty = x * 2, ny * 2 - 1
            else:
                tx, ty = x * 2, ny * 2 + 1
        else:
            if nx > x:
                tx, ty = nx * 2 - 1, y * 2
            else:
                tx, ty = nx * 2 + 1, y * 2
        return nx, ny, tx, ty
    else:
        return -1, -1, -1, -1

def create_labyrinth(n=5, m=5):
    """Генерация лабиринта"""
    reach_matrix = []
    for i in range(n):  # создаём матрицу достижимости ячеек
        reach_matrix.append([])
        for j in range(m):
            reach_matrix[i].append(False)
    transition_matrix = []
    for i in range(n * 2 - 1):  # заполнение матрицы переходов
        transition_matrix.append([])
        for j in range(m * 2 - 1):
            if i % 2 == 0 and j % 2 == 0:
                transition_matrix[i].append(True)
            else:
                transition_matrix[i].append(False)
    start = start_point_generate(n, m)
    finish = finish_point_generate(start, n, m)
    list_transition = [start]
    x, y = start
    reach_matrix[x][y] = True
    x, y, tx, ty = transition_choice(x, y, reach_matrix)
    for i in range(1, m * n):
        while not (x >= 0 and y >= 0):
            x, y = list_transition[-1]
            list_transition.pop()
            x, y, tx, ty = transition_choice(x, y, reach_matrix)
        reach_matrix[x][y] = True
        list_transition.append((x, y))
        transition_matrix[tx][ty] = True
        x, y, tx, ty = transition_choice(x, y, reach_matrix)
    return transition_matrix, start, finish  # возвращаем матрицу проходов и начальную точку

def generate_room_with_holes(width, height, depth, num_holes, labyrinth_matrix):
    # Определите вершины комнаты
    vertices = [
        [0, 0, 0],
        [width, 0, 0],
        [width, 0, depth],
        [0, 0, depth],
        [0, height, 0],
        [width, height, 0],
        [width, height, depth],
        [0, height, depth]
    ]

    # Определите грани комнаты
    faces = [
        [0, 1, 2],
        [0, 2, 3],
        [4, 5, 6],
        [4, 6, 7],
        [0, 1, 5],
        [0, 5, 4],
        [1, 2, 6],
        [1, 6, 5],
        [2, 3, 7],
        [2, 7, 6],
        [3, 0, 4],
        [3, 4, 7]
    ]

    # Добавляем стены по лабиринту
    cell_width = 10
    for i in range(len(labyrinth_matrix)):
        for j in range(len(labyrinth_matrix[i])):
            if not labyrinth_matrix[i][j]:
                # Если это стена, то добавляем ее в список вершин и граней
                x = i * cell_width
                y = j * cell_width
                z = 0
                vertices.extend([
                    [x, y, z],
                    [x + cell_width, y, z],
                    [x + cell_width, y + cell_width, z],
                    [x, y + cell_width, z],
                    [x, y, height],
                    [x + cell_width, y, height],
                    [x + cell_width, y + cell_width, height],
                    [x, y + cell_width, height]
                ])
                faces.extend([
                    [len(vertices) - 8, len(vertices) - 7, len(vertices) - 6],
                    [len(vertices) - 8, len(vertices) - 6, len(vertices) - 5],
                    [len(vertices) - 4, len(vertices) - 3, len(vertices) - 2],
                    [len(vertices) - 4, len(vertices) - 2, len(vertices) - 1],
                    [len(vertices) - 8, len(vertices) - 4, len(vertices) - 7],
                    [len(vertices) - 7, len(vertices) - 4, len(vertices) - 3],
                    [len(vertices) - 6, len(vertices) - 5, len(vertices) - 2],
                    [len(vertices) - 5, len(vertices) - 1, len(vertices) - 2],
                    [len(vertices) - 8, len(vertices) - 6, len(vertices) - 4],
                    [len(vertices) - 6, len(vertices) - 10, len(vertices) - 4],
                    [len(vertices) - 7, len(vertices) - 3, len(vertices) - 5],
                    [len(vertices) - 5, len(vertices) - 9, len(vertices) - 3]
                ])

    mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))
    return mesh

matrix, start, finish = create_labyrinth(10, 10)
room = generate_room_with_holes(100, 10, 100, 100, matrix)

# Сохранение изосурфейса в OBJ файл
filename = os.path.join(os.path.expanduser("~"), "Desktop", "room.obj")
room.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.add_collection3d(room)
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
ax.set_zlim(0, 10)
plt.show()
MakarovDs вне форума Ответить с цитированием
Старый 20.11.2024, 11:33   #199
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Лабиринт с дырками
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
import os
import random

def start_point_generate(n, m):
    """Функция выбора точки начала лабиринта"""
    if random.choice([True, False]):
        if random.choice([True, False]):
            start = (0, random.randint(0, m - 1))
        else:
            start = (n - 1, random.randint(0, m - 1))
    else:
        if random.choice([True, False]):
            start = (random.randint(0, n - 1), 0)
        else:
            start = (random.randint(0, n - 1), m - 1)
    return start

def finish_point_generate(start, n, m):
    """Выбор точки конца лабиринта"""
    return n - 1 - start[0], m - 1 - start[1]

def transition_choice(x, y, rm):
    """Функция выбора дальнейшего пути в генерации лабиринта"""
    choice_list = []
    if x > 0:
        if not rm[x - 1][y]:
            choice_list.append((x - 1, y))
    if x < len(rm) - 1:
        if not rm[x + 1][y]:
            choice_list.append((x + 1, y))
    if y > 0:
        if not rm[x][y - 1]:
            choice_list.append((x, y - 1))
    if y < len(rm[0]) - 1:
        if not rm[x][y + 1]:
            choice_list.append((x, y + 1))
    if choice_list:
        nx, ny = random.choice(choice_list)
        if x == nx:
            if ny > y:
                tx, ty = x * 2, ny * 2 - 1
            else:
                tx, ty = x * 2, ny * 2 + 1
        else:
            if nx > x:
                tx, ty = nx * 2 - 1, y * 2
            else:
                tx, ty = nx * 2 + 1, y * 2
        return nx, ny, tx, ty
    else:
        return -1, -1, -1, -1

def create_labyrinth(n=5, m=5):
    """Генерация лабиринта"""
    reach_matrix = []
    for i in range(n):  # создаём матрицу достижимости ячеек
        reach_matrix.append([])
        for j in range(m):
            reach_matrix[i].append(False)
    transition_matrix = []
    for i in range(n * 2 - 1):  # заполнение матрицы переходов
        transition_matrix.append([])
        for j in range(m * 2 - 1):
            if i % 2 == 0 and j % 2 == 0:
                transition_matrix[i].append(True)
            else:
                transition_matrix[i].append(False)
    start = start_point_generate(n, m)
    finish = finish_point_generate(start, n, m)
    list_transition = [start]
    x, y = start
    reach_matrix[x][y] = True
    x, y, tx, ty = transition_choice(x, y, reach_matrix)
    for i in range(1, m * n):
        while not (x >= 0 and y >= 0):
            x, y = list_transition[-1]
            list_transition.pop()
            x, y, tx, ty = transition_choice(x, y, reach_matrix)
        reach_matrix[x][y] = True
        list_transition.append((x, y))
        transition_matrix[tx][ty] = True
        x, y, tx, ty = transition_choice(x, y, reach_matrix)
    return transition_matrix, start, finish  # возвращаем матрицу проходов и начальную точку

def generate_labyrinth(width, height, depth, labyrinth_matrix):
    # Добавляем стены по лабиринту
    cell_width = 10
    labyrinth_height = height - 10
    labyrinth_depth = depth - 10
    labyrinth_width = width - 10
    vertices = []
    faces = []
    for i in range(len(labyrinth_matrix)):
        for j in range(len(labyrinth_matrix[i])):
            if not labyrinth_matrix[i][j]:
                # Если это стена, то добавляем ее в список вершин и граней
                x = 5 + j * cell_width
                y = labyrinth_height
                z = 5 + i * cell_width
                vertices.extend([
                    [x, y, z],
                    [x + cell_width, y, z],
                    [x + cell_width, y, z + cell_width],
                    [x, y, z + cell_width],
                    [x, y - cell_width, z],
                    [x + cell_width, y - cell_width, z],
                    [x + cell_width, y - cell_width, z + cell_width],
                    [x, y - cell_width, z + cell_width]
                ])
                faces.extend([
                    [len(vertices) - 8, len(vertices) - 7, len(vertices) - 6],
                    [len(vertices) - 8, len(vertices) - 6, len(vertices) - 5],
                    [len(vertices) - 4, len(vertices) - 3, len(vertices) - 2],
                    [len(vertices) - 4, len(vertices) - 2, len(vertices) - 1],
                    [len(vertices) - 8, len(vertices) - 4, len(vertices) - 7],
                    [len(vertices) - 7, len(vertices) - 4, len(vertices) - 3],
                    [len(vertices) - 6, len(vertices) - 5, len(vertices) - 2],
                    [len(vertices) - 5, len(vertices) - 1, len(vertices) - 2]
                ])

    mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))
    mesh.remove_duplicate_faces()
    mesh.remove_degenerate_faces()
    mesh.remove_unreferenced_vertices()
    return mesh

matrix, start, finish = create_labyrinth(10, 10)
labyrinth = generate_labyrinth(100, 50, 100, matrix)

# Сохранение изосурфейса в OBJ файл
filename = os.path.join(os.path.expanduser("~"), "Desktop", "labyrinth.obj")
labyrinth.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.add_collection3d(labyrinth)
ax.set_xlim(0, 100)
ax.set_ylim(0, 50)
ax.set_zlim(0, 100)
plt.show()
MakarovDs вне форума Ответить с цитированием
Старый 20.11.2024, 11:39   #200
MakarovDs
Форумчанин
 
Аватар для MakarovDs
 
Регистрация: 10.01.2020
Сообщений: 316
По умолчанию

Плоские дороги лабиринтов
Код:
import numpy as np
import trimesh
import matplotlib.pyplot as plt
import os
import random

def start_point_generate(n, m):
    """Функция выбора точки начала лабиринта"""
    if random.choice([True, False]):
        if random.choice([True, False]):
            start = (0, random.randint(0, m - 1))
        else:
            start = (n - 1, random.randint(0, m - 1))
    else:
        if random.choice([True, False]):
            start = (random.randint(0, n - 1), 0)
        else:
            start = (random.randint(0, n - 1), m - 1)
    return start

def finish_point_generate(start, n, m):
    """Выбор точки конца лабиринта"""
    return n - 1 - start[0], m - 1 - start[1]

def transition_choice(x, y, rm):
    """Функция выбора дальнейшего пути в генерации лабиринта"""
    choice_list = []
    if x > 0:
        if not rm[x - 1][y]:
            choice_list.append((x - 1, y))
    if x < len(rm) - 1:
        if not rm[x + 1][y]:
            choice_list.append((x + 1, y))
    if y > 0:
        if not rm[x][y - 1]:
            choice_list.append((x, y - 1))
    if y < len(rm[0]) - 1:
        if not rm[x][y + 1]:
            choice_list.append((x, y + 1))
    if choice_list:
        nx, ny = random.choice(choice_list)
        if x == nx:
            if ny > y:
                tx, ty = x * 2, ny * 2 - 1
            else:
                tx, ty = x * 2, ny * 2 + 1
        else:
            if nx > x:
                tx, ty = nx * 2 - 1, y * 2
            else:
                tx, ty = nx * 2 + 1, y * 2
        return nx, ny, tx, ty
    else:
        return -1, -1, -1, -1

def create_labyrinth(n=5, m=5):
    """Генерация лабиринта"""
    reach_matrix = []
    for i in range(n):  # создаём матрицу достижимости ячеек
        reach_matrix.append([])
        for j in range(m):
            reach_matrix[i].append(False)
    transition_matrix = []
    for i in range(n * 2 - 1):  # заполнение матрицы переходов
        transition_matrix.append([])
        for j in range(m * 2 - 1):
            if i % 2 == 0 and j % 2 == 0:
                transition_matrix[i].append(True)
            else:
                transition_matrix[i].append(False)
    start = start_point_generate(n, m)
    finish = finish_point_generate(start, n, m)
    list_transition = [start]
    x, y = start
    reach_matrix[x][y] = True
    x, y, tx, ty = transition_choice(x, y, reach_matrix)
    for i in range(1, m * n):
        while not (x >= 0 and y >= 0):
            x, y = list_transition[-1]
            list_transition.pop()
            x, y, tx, ty = transition_choice(x, y, reach_matrix)
        reach_matrix[x][y] = True
        list_transition.append((x, y))
        transition_matrix[tx][ty] = True
        x, y, tx, ty = transition_choice(x, y, reach_matrix)
    return transition_matrix, start, finish  # возвращаем матрицу проходов и начальную точку

def generate_labyrinth(width, height, depth, labyrinth_matrix):
    # Добавляем стены по лабиринту
    cell_width = 10
    labyrinth_height = height - 10
    labyrinth_depth = depth - 10
    labyrinth_width = width - 10
    vertices = []
    faces = []
    for i in range(len(labyrinth_matrix)):
        for j in range(len(labyrinth_matrix[i])):
            if not labyrinth_matrix[i][j]:
                # Если это стена, то добавляем ее в список вершин и граней
                x = 5 + j * cell_width
                y = labyrinth_height
                z = 5 + i * cell_width
                vertices.extend([
                    [x, y, z],
                    [x + cell_width, y, z],
                    [x + cell_width, y, z + cell_width],
                    [x, y, z + cell_width]
                ])
                faces.extend([
                    [len(vertices) - 4, len(vertices) - 3, len(vertices) - 2],
                    [len(vertices) - 4, len(vertices) - 2, len(vertices) - 1]
                ])

    mesh = trimesh.Trimesh(vertices=np.array(vertices), faces=np.array(faces))
    mesh.remove_duplicate_faces()
    mesh.remove_degenerate_faces()
    mesh.remove_unreferenced_vertices()
    return mesh

matrix, start, finish = create_labyrinth(10, 10)
labyrinth = generate_labyrinth(100, 50, 100, matrix)

# Сохранение изосурфейса в OBJ файл
filename = os.path.join(os.path.expanduser("~"), "Desktop", "labyrinth.obj")
labyrinth.export(filename)
print(f"Model saved as {filename}")

# Визуализация
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.add_collection3d(labyrinth)
ax.set_xlim(0, 100)
ax.set_ylim(0, 50)
ax.set_zlim(0, 100)
plt.show()
MakarovDs вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
помогите с генератором слов Мой повелитель Общие вопросы C/C++ 6 27.02.2016 23:46
Зарубежные микроконтроллеры с встроенным ШИМ-генератором MyLastHit Компьютерное железо 6 22.10.2013 14:33
написание генератора фракталов Жюлиа kyzmich2370 Visual C++ 1 06.11.2012 09:57
Помогите с генератором чисел на Pascal vadmaruschak Помощь студентам 6 13.09.2009 17:06
Игры фракталов на VB Kail Свободное общение 1 29.05.2009 09:30