スキップしてメイン コンテンツに移動

Chat GPT で 長方体 cuboid 1x1x10 を描く

今回は 

長方体 cuboid 1x1x10 を描く

平行6面体



blender 2023 初歩の初歩 005 ChatGPT で python 書いてもらい 16個の球体を正方形に並べて 描けた 









blender 3.4.1 python で 透明な長方体を描いて 比率は 1x1x10





とにかく さっきの 冒頭に import math と書いて 

先程提供したコードの冒頭にimport mathを追加することは、コードにエラーを引き起こすことはありません。






import bpy の 次の行に import math と書いたら 実行できたので もう一度 書き直して

import mathを追加して、透明な長方体を描画するPythonコードを以下に示します。





import bpy
import math

# 透明なマテリアルを作成
mat = bpy.data.materials.new(name="Transparent")
mat.use_nodes = True
nodes = mat.node_tree.nodes
links = mat.node_tree.links
transparent_node = nodes.new(type="ShaderNodeBsdfTransparent")
output_node = nodes.new(type="ShaderNodeOutputMaterial")
links.new(transparent_node.outputs[0], output_node.inputs[0])

# 長方体を作成
bpy.ops.mesh.primitive_cube_add(size=1)
cube = bpy.context.selected_objects[0]
cube.scale = (1, 1, 10)

# マテリアルを割り当て
if cube.data.materials:
    # マテリアルがすでに割り当てられている場合は、最初のマテリアルを置換する
    cube.data.materials[0] = mat
else:
    # マテリアルが割り当てられていない場合は、新しいマテリアルを追加する
    cube.data.materials.append(mat)

















togetter.com/t/c2022meetzionad
togetter.com/t/b2022meetzionad




twitter 新着検索 Dürer & 測距儀


aaa
bbb




ccc twitter zionadchat
twitter に追い出されたら 連絡先は Gettr https://gettr.com/user/zionadchat
twitter サブアカウント https://twitter.com/2022zionad

old page いいい
new page いいい

目次 2022の目次 単純トリック hatena zionadchat
いいいいいいいい




このブログの人気の投稿

机設定 Brave 用 2023

  机設定   Brave 用 2023  20230116 まで更新 更新は こっちへ https://hayaashi2021.blogspot.com/2023/01/brave-2023-20230116.html https://www.speedtest.net/ja jazzionad blog 空間認識の練習 2023 zionadchat CHATGPT 英語の練習 思考ワークエリア確保 開店休業状態のblog 波の音 https://www.youtube.com/watch?v=X6FlmuEPDKk 天気 東京 https://www.wunderground.com/weather/jp/tokyo/I13KITAY4?utm_source=HomeCard&utm_content=Button&cm_ven=HomeCardButton https://chat.openai.com/chat https://englishjazzionad.blogspot.com/2023/01/brave-2023.html 【初心者向け】blenderのテクスチャペイントでサイコロを作ろう【最短で理解】 How to Tile a Texture Without Repetition - Blender Tutoria https://www.youtube.com/watch?v=-VgtSL5ZpYc Sunset and Ocean Waves on a Tropical Beach https://www.youtube.com/watch?v=LbeYOvXSP-8 真・防衛研究チャンネル https://www.youtube.com/watch?v=rHwGueB6KFM 【初心者向け】世界一やさしいBlender入門!使い方&導入〜画像作成までを徹底解説【3.3対応】 3D Bibi https://www.youtube.com/watch?v=S6aAvxUx2ko ChatGPT https://chat.openai.com/chat https://www.learngpt.com/ Google 翻訳 DeepL翻訳:高精度な翻訳ツール Weblio 翻訳 翻訳の英訳 - 英辞郎 - アル https:

Chat 20130118 Homage

オマージュ 英語で homage ad jazzion パクリとの違い "Pastiche" and "homage" are both terms related to artistic imitation, but they have slightly different connotations. A pastiche is an artwork that imitates the style of another artist or period, often in a playful or satirical way. It is often seen as a form of flattery, but it can also be seen as a form of critique. While Homage is a show of respect or admiration for someone or something, often by imitating their style. It is often more serious and sincere than pastiche, and it is intended to pay tribute to the original work or artist. pastiche https://ejje.weblio.jp/content/pastiche 2023年1月18日水曜日 下書き Dürer & 測距儀2022c049 三角関係の狙撃 b Solar Ray https://2023zionadchat.blogspot.com/2023/01/durer-2022c049-b-solar-ray.html 文章作成の頼れるアシスタント、AI搭載のDeepL Writeが新登場 2023年1月17日 DeepL Writeはベータ版で、無料でどなたでもご利用いただけます。 https://www.deepl.com/ja/blog/introducing-deepl-write 昨日の 米国 死亡者総数 I'm sorry, but I do not have access to current informatio

失敗 PERPLEXITY 球体 12個 均等に 平面に並べて

blender で python 使って 球体 12個 均等に 平面に並べて blender 3.4.1 PERPLEXITY To create 12 spheres evenly spaced on a plane in Blender 3.4.1 using Python, you can use the following code: import bpy import mathutils # Create an empty object to hold the spheres empty = bpy.data.objects.new("Sphere Empty", None) bpy.context.scene.collection.objects.link(empty) # Define the radius of each sphere and the number of spheres radius = 1.0 num_spheres = 12 # Calculate the angle between each sphere angle_between_spheres = (2 * math.pi) / num_spheres # Create each sphere and position it around the empty object for i in range(num_spheres):     x = radius * math.cos(i * angle_between_spheres)     y = radius * math.sin(i * angle_between_spheres)     z = 0          # Create a new sphere and link it to the scene     bpy.ops.mesh.primitive_uv_sphere_add(location=(x, y, z))     sphere = bpy.context.object     bpy.context.scene.collection.objects.link(sphere)          # Parent the sphere to the empty object