2023年3月20日月曜日

円の回転考慮 円板 半径30

aaa














# z=0平面 円半径30


import bpy
import math

# Create a circle
bpy.ops.mesh.primitive_circle_add(radius=30.0, fill_type='TRIFAN', location=(0.0, 0.0, 0.0))
circle = bpy.context.object

# オブジェクトに名前を付ける
my_object_name = "円板 Z=0"
circle.name = my_object_name

# Set rotation and location for the circle
circle.rotation_euler = (math.radians(90.0), 0.0, 0.0)
circle.location = (0.0, 0.0, 0.0)

# Rotate the circle around the x-axis
rot_angle = 0.0
rot_step = math.radians(5.0)
for i in range(72):
    bpy.context.scene.frame_set(i+1)
    rot_angle += rot_step
    circle.rotation_euler = (rot_angle, 0.0, 0.0)
    circle.keyframe_insert(data_path="rotation_euler", index=-1)




import bpy
import math

# Create a circle
bpy.ops.mesh.primitive_circle_add(radius=30.0, fill_type='TRIFAN', location=(0.0, 0.0, 0.0))
circle = bpy.context.object

# オブジェクトに名前を付ける
my_object_name = "円板 Zzzz=0"
circle.name = my_object_name

# Set rotation and location for the circle
circle.rotation_euler = (math.radians(0.0), 0.0, 0.0)
circle.location = (0.0, 0.0, 0.0)

# Rotate the circle around the x-axis
rot_angle = 0.0
rot_step = math.radians(5.0)
for i in range(72):
    bpy.context.scene.frame_set(i+1)
    rot_angle += rot_step
    circle.rotation_euler = (rot_angle, 0.0, 0.0)
    circle.keyframe_insert(data_path="rotation_euler", index=-1)








# オブジェクトに名前を付ける
my_object_name = "円板 Z=0"
cube.name = my_object_name


if __name__ == "__main__":
    create_circle()









Y =0平面 円半径30


import bpy
import math

def create_circle():
    # Create a circle
    bpy.ops.mesh.primitive_circle_add(radius=30.0, fill_type='TRIFAN', location=(0.0, 0.0, 0.0))
    circle = bpy.context.object
    
    # Set rotation and location for the circle
    circle.rotation_euler = ( 0.0 ,math.radians(90.0), 0.0)
    circle.location = (0.0, 0.0, 0.0)

    # Rotate the circle around the x-axis
    rot_angle = 0.0
    rot_step = math.radians(5.0)
    for i in range(72):
        bpy.context.scene.frame_set(i+1)
        rot_angle += rot_step
        circle.rotation_euler = (rot_angle, 0.0, 0.0)
        circle.keyframe_insert(data_path="rotation_euler", index=-1)

    # Rename the object
    my_object_name = "円板 Y=0"
    circle.name = my_object_name

if __name__ == "__main__":
    create_circle()





y=0平面


import bpy
import math

# Create a circle
bpy.ops.mesh.primitive_circle_add(radius=30.0, fill_type='TRIFAN', location=(0.0, 0.0, 0.0))
circle = bpy.context.object

# Set rotation and location for the circle
circle.rotation_euler = (math.radians(90.0), 0.0, 0.0)
circle.location = (0.0, 0.0, 0.0)

# Set alpha value for the circle material
circle.data.materials[0].diffuse_color = (1.0, 1.0, 1.0, 0.1) # RGBA values: (red, green, blue, alpha)

# Rotate the circle around the x-axis
rot_angle = 0.0
rot_step = math.radians(5.0)
for i in range(72):
    bpy.context.scene.frame_set(i+1)
    rot_angle += rot_step
    circle.rotation_euler = (rot_angle, 0.0, 0.0)
    circle.keyframe_insert(data_path="rotation_euler", index=-1)


 # Rename the object
    my_object_name = "円板 X=0"
    circle.name = my_object_name

if __name__ == "__main__":
    create_circle()














x=0平面


import bpy
import math

# Create a circle
bpy.ops.mesh.primitive_circle_add(radius=30.0, fill_type='TRIFAN', location=(0.0, 0.0, 0.0))
circle = bpy.context.object

# Set rotation and location for the circle
circle.rotation_euler = (0.0,math.radians(90.0), 0.0)
circle.location = (0.0, 0.0, 0.0)

# Set alpha value for the circle material
circle.data.materials[0].diffuse_color = (1.0, 1.0, 1.0, 0.1) # RGBA values: (red, green, blue, alpha)

# Rotate the circle around the x-axis
rot_angle = 0.0
rot_step = math.radians(5.0)
for i in range(72):
    bpy.context.scene.frame_set(i+1)
    rot_angle += rot_step
    circle.rotation_euler = (0.0,rot_angle, 0.0,)
    circle.keyframe_insert(data_path="rotation_euler", index=-1)













import bpy

# Create a sphere
bpy.ops.mesh.primitive_uv_sphere_add(radius=1.0, enter_editmode=False, location=(30.0, 0.0, 0.0))

# Get the sphere object
sphere = bpy.context.object


半径30の(x,y,0)の円周に 16個 等間隔で作って









import bpy
import math


my_collection_name = "あああああ"

# コレクションを作成する
col = bpy.data.collections.new(my_collection_name)
bpy.context.scene.collection.children.link(col)





import bpy
import math

# シリンダーを作成する
bpy.ops.mesh.primitive_cylinder_add(radius=2.5, depth=60.0, location=(-0.0, 0.0, 0.0))
cylinder = bpy.context.object

# オブジェクトに名前を付ける
cylinder.name = "My Cylinder"

# シリンダーの回転と位置を設定する 
cylinder.rotation_euler = ( math.pi/2, 0, 0 )
cylinder.location = (0.0, 0.0, 0.0)


# オブジェクトに名前を付ける

my_object_name = "あああああ"
cylinder.name = my_object_name


bbb


連番 007 未来光円錐 過去光円錐 円周中心からの球体放出

aaa 参考 2023年3月26日日曜日 製作 002b 未来光円錐の方向 線路レールで https://ia2023sha.blogspot.com/2023/03/002b.html import bpy import math zion_co...