今日の書き出し設定 項目メモ帳 2023: 20231005 立方体と 光線 https://2023na2022.blogspot.com/2023/10/20231005.html
https://mokuji000zionad.hatenablog.com/
今日の書き出し設定 項目メモ帳 2023: 20231005 立方体と 光線 https://2023na2022.blogspot.com/2023/10/20231005.html
https://mokuji000zionad.hatenablog.com/
blender python
今日の書き出し設定 項目メモ帳 2023: 20231004 選択したオブジェクトを回転させる https://2023na2022.blogspot.com/2023/10/20231004.html?spref=tw
G Grab で 選択画像 移動
alt +G で 画像がセンターに移動
「配布 20231004 3軸 の 回転 001.blend」を共有
「配布 20231004 光時計 路面電車 001.blend」を共有
https://www.youtube.com/watch?v=6JjlXloUvAo
Dürer & 測距儀2022d054の2 王が決める時間 bbb 枠内を動く点と 2重枠内を動く点
https://togetter.com/li/2235505
https://mokuji000zionad.hatenablog.com/
「配布t20231001 正六角形と視線距離 002.blend」
https://drive.google.com/file/d/1Yh5GWgKeakH2XRwbM2ORNgKu5fJmOLJZ/view?usp=sharing
https://mokuji000zionad.hatenablog.com/
import bpy
import math
# 小数の桁数を指定
decimal_places = 1
def create_plane_at_position(position, width, height, name, x, y, z):
# 平面を作成(指定した座標に)
bpy.ops.mesh.primitive_plane_add(size=1, location=position)
plane = bpy.context.active_object
# 幅と高さを設定
plane.scale = (width, height, 1)
# マテリアルを作成
material = bpy.data.materials.new(name="Material_" + name)
plane.data.materials.append(material)
# マテリアルの設定
material.use_nodes = False
material.diffuse_color = (0.0, 1.0, 0.0, 1.0) # 緑色 (R:0.0, G:1.0, B:0.0, A:1.0)
# オブジェクトの名前を設定
formatted_name = "{} ({:.{}f}, {:.{}f}, {:.{}f})".format(name, x, decimal_places, y, decimal_places, z, decimal_places)
plane.name = formatted_name
def create_cone_or_circle_at_position(position, radius, height, name, x, y, z):
if position == (0, 0, 0):
# (0, 0, 0) の場合は円を作成
bpy.ops.mesh.primitive_circle_add(radius=radius, location=position)
obj = bpy.context.active_object
else:
# それ以外の場合は円錐を作成
bpy.ops.mesh.primitive_cone_add(vertices=32, radius1=radius, radius2=0, depth=height, location=position)
obj = bpy.context.active_object
# 円錐の底面中心を (0, 0, 0) から遠ざける向きを計算
direction = math.atan2(position[1], position[0])
distance = math.sqrt(position[0]**2 + position[1]**2 + position[2]**2)
angle = math.acos(position[2] / distance)
obj.rotation_euler = (angle + math.pi, 0, direction + math.pi / 2) # Y軸回りに90度回転
# マテリアルを作成
material = bpy.data.materials.new(name="Material_" + name)
obj.data.materials.append(material)
# マテリアルの設定
material.use_nodes = False
material.diffuse_color = (1.0, 0.0, 0.0, 1.0) # 赤色 (R:1.0, G:0.0, B:0.0, A:1.0)
# オブジェクトの名前を設定
formatted_name = "{} ({:.{}f}, {:.{}f}, {:.{}f})".format(name, x, decimal_places, y, decimal_places, z, decimal_places)
obj.name = formatted_name
# 正方形の面と円錐または円を作成
size = 0.3 # 正方形の一辺の長さ
spacing = 1.0 # 1間隔の大きさ
for i in range(-5, 6): # -5から5までの座標に作成
x = i * spacing
y = 0
z = 0
position = (x, y, z)
plane_name = "地図位置"
obj_name = "事象情報"
create_plane_at_position(position, size, size, plane_name, x, y, z)
create_cone_or_circle_at_position(position, math.sqrt(2) * size / 2, size / 2, obj_name, x, y, z)
https://mokuji000zionad.hatenablog.com/
import bpy
import mathutils
import math
# 円周の中心座標
center_x = 0
center_y = 0
center_z = 0
# 円周の半径
radius = 6
# 円周に配置する円錐の数
num_cones = 12
# 円錐の底面が遠くなる位置を定義(例えば、X=2, Y=2, Z=2の場合)
target_x = 0
target_y = 0
target_z = 6
# 円周上の点を計算する
theta_values = [2 * math.pi * i / num_cones for i in range(num_cones)]
circle_points = [(center_x + radius * math.cos(theta), center_y + radius * math.sin(theta), center_z) for theta in theta_values]
# 円錐を配置する関数
def place_cone(position, direction):
bpy.ops.mesh.primitive_cone_add(vertices=32, radius1=0.2, depth=24, location=position)
cone = bpy.context.active_object
bpy.context.view_layer.objects.active = cone
# 向きを設定
cone.rotation_euler = direction
# トーラスを描く関数
def draw_torus():
bpy.ops.mesh.primitive_torus_add(location=(center_x, center_y, center_z), align='WORLD', major_radius=radius+0.0, minor_radius=0.1)
# 球体を追加する関数
def add_sphere(position, radius):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=position)
# 円錐を配置
for point in circle_points:
# (0, 0, 0)への方向を計算
target_vector = mathutils.Vector((target_x - point[0], target_y - point[1], target_z - point[2]))
direction_rotation = target_vector.to_track_quat('Z', 'Y').to_euler()
# 円錐の配置
place_cone(point, direction_rotation)
# トーラスの描画
draw_torus()
# 球体の追加
add_sphere((target_x, target_y, target_z), 0.3)
https://mokuji000zionad.hatenablog.com/
https://mokuji000zionad.hatenablog.com/
https://mokuji000zionad.hatenablog.com/
HDRI(High Dynamic Range Image)は
HDRの画像で、多くの明るさ情報を持っている
高品質なHDR画像を無料でダウンロードできる
「HDRI Haven」【CC0, 商用利用可】 -
eizo.help https://eizo-help.hateblo.jp/entry/2019/07/12/114411
https://youtu.be/EVMbcXb9b6s?t=486
8:00/11:39 あたりから
Shader Editor
Object → World
Ctrl + T Mapping
blender youtbe 20230422 背景写真360度 回転 -
blenderzionadのブログ https://blenderzionad.hatenablog.com/entry/2023/04/22/125628
https://polyhaven.com/a/limpopo_golf_course
https://polyhaven.com/a/sunset_fairway
https://polyhaven.com/a/kloofendal_48d_partly_cloudy_puresky
import bpy
# Parameters for the square
size = 10
y_pos = 10
# Create the square
vertices = [
(-size/2, y_pos, -size/2),
(-size/2, y_pos, size/2),
(size/2, y_pos, size/2),
(size/2, y_pos, -size/2)
]
faces = [(0, 1, 2, 3)]
# Create the mesh
mesh = bpy.data.meshes.new(name="SquareMesh")
mesh.from_pydata(vertices, [], faces)
# Create the object and link it to the scene
obj = bpy.data.objects.new("Square", mesh)
bpy.context.scene.collection.objects.link(obj)
import bpy
# Parameters for the square
size = 10
y_pos = 5
# Create the square
vertices = [
(-size/2, y_pos, -size/2),
(-size/2, y_pos, size/2),
(size/2, y_pos, size/2),
(size/2, y_pos, -size/2)
]
faces = [(0, 1, 2, 3)]
# Create the mesh
mesh = bpy.data.meshes.new(name="SquareMesh")
mesh.from_pydata(vertices, [], faces)
# Create the object and link it to the scene
obj = bpy.data.objects.new("Square", mesh)
bpy.context.scene.collection.objects.link(obj)
[Blender]オブジェクトに画像テクスチャを貼り付ける方法(画像あり)
1
2 UV to Vector
3
Vector to Vector
【Blender】テクスチャの貼り方をしっかりとマスターしよう!
https://original-game.com/blender-how-to-apply-a-texture/
【blender 初心者】画像テクスチャを貼り付けて葉っぱを作る
https://www.youtube.com/watch?v=5BFo_GtmIGU
ああ
import bpy
# Get the camera object
camera = bpy.data.objects.get("Camera")
# If the camera exists, set its location to (0, 0, 0)
if camera:
camera.location = (0, 0, 0)
This script will find the camera object in the scene (assuming it is named "Camera") and set its location to (0, 0, 0). If there is a camera in the scene, it will be moved to the specified position.
Assumed Plane の 球体群
blender python
Y=0 の平面に
球体を作る
球体半径 0.1
x=-5から+5
Z=-5から+5の
交点に 作る
# Y=0 平面の 同時性
import bpy
# Parameters for the spheres
radius = 0.1
x_min = -5
x_max = 5
z_min = -5
z_max = 5
# Create spheres at the intersection points
for x in range(x_min, x_max + 1):
for z in range(z_min, z_max + 1):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=(x, 0, z))
# Y=1 平面の 同時性
import bpy
# Parameters for the spheres
radius = 0.1
x_min = -5
x_max = 5
z_min = -5
z_max = 5
# Create spheres at the intersection points
for x in range(x_min, x_max + 1):
for z in range(z_min, z_max + 1):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=(x, 1, z))
# Y=5 平面の 同時性
import bpy
# Parameters for the spheres
radius = 0.1
x_min = -5
x_max = 5
z_min = -5
z_max = 5
# Create spheres at the intersection points
for x in range(x_min, x_max + 1):
for z in range(z_min, z_max + 1):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=(x, 5, z))
# Y=root 3 平面の 同時性
import bpy
# Parameters for the spheres
radius = 0.1
x_min = -5
x_max = 5
z_min = -5
z_max = 5
# Create spheres at the intersection points
for x in range(x_min, x_max + 1):
for z in range(z_min, z_max + 1):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=(x, 3 ** 0.5, z))
# Y=2 平面の 同時性
import bpy
# Parameters for the spheres
radius = 0.1
x_min = -5
x_max = 5
z_min = -5
z_max = 5
# Create spheres at the intersection points
for x in range(x_min, x_max + 1):
for z in range(z_min, z_max + 1):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=(x, 2, z))
# Y=5 平面の 同時性
import bpy
# Parameters for the spheres
radius = 0.1
x_min = -5
x_max = 5
z_min = -5
z_max = 5
# Create spheres at the intersection points
for x in range(x_min, x_max + 1):
for z in range(z_min, z_max + 1):
bpy.ops.mesh.primitive_uv_sphere_add(radius=radius, location=(x, 10, z))
あ
https://2023na2022.blogspot.com/2023/07/20230724-railcar.html
# コレクションを作る 重複の場合 作らない
import bpy
# List of collection names
collection_names = [
"単位円 torus",
"xyz 軸 円柱"
]
# Function to create a new collection if it doesn't exist
def create_collection_if_not_exists(name):
if name not in bpy.data.collections:
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
# Create collections
for name in collection_names:
create_collection_if_not_exists(name)
想定平面 英語に訳して
ChatGPT
"想定平面"は英語で "Reference Plane" もしくは "Assumed Plane" と訳されます。これは特定の計算や設計の際に、基準となる平面を指す用語です。この平面は仮定されるか、あるいは既知の平面であることが一般的です。
例えば、建築設計においては、想定平面は建物の基準となる平面を意味することがあります。また、数学や物理学においても、特定の計算や解析における基準として想定される平面を指す場合があります。
したがって、文脈によって適切な意味を持つ用語として "Reference Plane" もしくは "Assumed Plane" を使用することができます。
想定平面 英語に訳して
ChatGPT
"想定平面"を英語に訳すと、"reference plane" もしくは "datum plane" となります。
datum
https://www.google.com/search?q=datum&rlz=1C1TKQJ_jaJP1038JP1038&sourceid=chrome&ie=UTF-8
DataとDatumの違いは何ですか?
dataは必ずしも英語でまだ元の意味を保っている「datum」(ラテン語の「与えられたもの」を意味する)の複数形ではありません。 「datum」は地図製作や地理学の分野で使用され、基準点や基準線、基準面を意味します。 「data」が「datum」の複数形でないのであれば「are」を使う必要はなくなります。
datum plane
https://www.researchgate.net/figure/Datum-planes-of-human-body_fig3_343245147
あああ
今日の書き出し設定 項目メモ帳 2023: 20231005 立方体と 光線 https://2023na2022.blogspot.com/2023/10/20231005.html https://mokuji000zionad.hatenablog.com/