修业使用豆绘AI创作了一幅AI智能出图作品,创作时间为2025-12-05 09:27,创作主题为默认主题,创作描述为未填写,画风选择为无,创作模版为未设置和未设置风格参考图,欢迎围观并为TA点赞,作品链接:https://www.douhuiai.com/works/AaIQr7IIcPyw_zdp6hS2rw.html
内容由 AI 生成,请仔细甄别
创作描述
# 分子构建基础框架
import numpy as np
class TriglycerideModel:
def __init__(self, chain_length=18):
self.chain_length = chain_length
self.bond_length = 1.54 # C-C键长(Å)
self.chain_angle = 109.5 # 四面体角
def create_fatty_acid_chain(self, tilt_angle=0, rotation=0):
"""创建脂肪酸链"""
# 构建全反式构象
coords = []
for i in range(self.chain_length):
x = i * self.bond_length * np.sin(np.radians(tilt_angle))
y = i * self.bond_length * np.cos(np.radians(tilt_angle))
z = 0
# 添加旋转
if rotation != 0:
x, y = self._rotate_point(x, y, rotation)
coords.append([x, y, z])
return np.array(coords)
# Alpha晶型 - 六方无序排列
import bpy
import random
import math
def create_alpha_crystal():
# 晶格参数
a = 4.8 # Å
c = 65.0 # Å
short_spacing = 4.15
# 创建六方晶格
lattice_points = []
for i in range(-5, 6):
for j in range(-5, 6):
x = a * (i + 0.5 * j)
y = a * (j * math.sqrt(3) / 2)
lattice_points.append((x, y, 0))
# 放置分子
molecules = []
for i, point in enumerate(lattice_points):
# 创建脂肪酸链
chain = create_fatty_acid_chain(
tilt_angle=90, # 垂直
rotation=random.uniform(-15, 15) # 无序旋转
)
# 平移至晶格点
chain.translate(point)
molecules.append(chain)
# 创建层状堆叠
layers = []
for layer_z in [0, c/2]: # 双分子层
for molecule in molecules:
# 上层分子方向反转
if layer_z > 0:
molecule.rotate(math.pi, 'X')
molecule.translate((0, 0, layer_z))
layers.append(molecule)
# 视觉设置
for obj in layers:
obj.color = (0.7, 0.8, 1.0, 0.3) # 浅蓝半透明
obj.scale = (0.1, 0.1, 0.1) # 尺寸调整
return {"crystal": layers, "lattice": lattice_points}
出图信息
创作类型
AI智能出图
创作时间
12/5/2025