Hi!
Here is my try. Please give me some suggestion. Thank U
well since iâm trying to learn python, i came up with the idea to do a script for a twisted torus, so i pick up the script of the torus from the blender scripts dir. and iâve inserted a twist
anborc
Just stunning. Any chance of a tutorial or a screen shot of your set up?
gurus,
your twists have me in a twisted fixâŠi wanna learn how to model thisâŠi am getting fan shapes and not what is shown aboveâŠwhere can i download the tutorial?
chela69
hi, try my script, itâs a modified script from the torus, then you just have to face loop select. Thatâs how i made mine.
hope it helps
hi paulo_gomes,
could u upload u r script somewhere else or hereâŠthe link above takes me to a page i canât fathomâŠ
chela69
#!BPY
"""
Name: 'Twisted Torus'
Blender: 243
Group: 'AddMesh'
"""
import BPyAddMesh
import Blender
from math import cos, sin, pi
def add_torus(Raio_Torus, Raio_Circulo, Seccoes_Torus, Vertices_Circulo, Voltas):
Vector = Blender.Mathutils.Vector
RotationMatrix = Blender.Mathutils.RotationMatrix
vertices = []
faces = []
i1 = 0
total_vertices = Seccoes_Torus * Vertices_Circulo
for major_index in xrange(Seccoes_Torus):
mtx = RotationMatrix( 360 * float(major_index)/Seccoes_Torus, 3, 'z' )
rotvoltas = 2*pi*major_index/Seccoes_Torus * Voltas
for minor_index in xrange(Vertices_Circulo):
angle = (2*pi*minor_index/Vertices_Circulo) + rotvoltas
print mtx
vertices.append( Vector(Raio_Torus+(cos(angle)*Raio_Circulo), 0, (sin(angle)*Raio_Circulo)) * mtx )
if minor_index+1==Vertices_Circulo:
i2 = (major_index)*Vertices_Circulo
i3 = i1 + Vertices_Circulo
i4 = i2 + Vertices_Circulo
else:
i2 = i1 + 1
i3 = i1 + Vertices_Circulo
i4 = i3 + 1
if i2>=total_vertices: i2 = i2-total_vertices
if i3>=total_vertices: i3 = i3-total_vertices
if i4>=total_vertices: i4 = i4-total_vertices
faces.append( (i3,i4,i2,i1) )
i1+=1
return vertices, faces
def main():
Draw = Blender.Draw
Raio_Torus = Draw.Create(1.0) # Raio do torus
Raio_Circulo = Draw.Create(0.25) # Raio do circulo que vai formar o torus
Seccao_Torus = Draw.Create(48) # NÂș de secçÔes do torus
Vertices_Circulo = Draw.Create(16) # NÂș de vertices do circulo q vai formar o torus
Voltas = Draw.Create(1) # NÂș de voltas
if not Draw.PupBlock('Adiciona Twisted Torus', [\
('Raio do Torus:', Raio_Torus, 0.01, 100, ''),\
('Raio do Circulo:', Raio_Circulo, 0.01, 100, ''),\
('SecçÔes do Torus:', Seccao_Torus, 3, 256, ''),\
('Vertices do Circulo:', Vertices_Circulo, 3, 256, ''),\
('NÂș de Voltas:', Voltas, 0, 5, ''),\
]):
return
# Chama a função add_torus e atribui o resultado nas variåveis vertices e faces
vertices, faces = add_torus(Raio_Torus.val, Raio_Circulo.val, Seccao_Torus.val, Vertices_Circulo.val, Voltas.val)
# Função para adicionar uma mesh
BPyAddMesh.add_mesh_simple('Torus', vertices, [], faces)
main()
here it is, is a copy of the add torus but with a extra field that sets the number of twists
Hi
Please comment on this, How much left?
Without Torus
@kkrawal: when rendering something on a basic plan make sure it extends far enough to not see the corners (so having a horizon no probs but make sure its wide enough)
The texture based alpha value of the orange rings is kinda odd.
Let your name not cast shadows, itâs very distracting.
But the model is good.
Thanks. See another view
It looks nice, but the original didnât have one continuous ring. It has several separate rings.
@tcrazy
@samf
I think original also has same type of rings. Please tcrazy guide me about the rights. please show your model without torus.
Here you go kkrawal. I had fun with the picture and highlighted each ring for you.
Hi samf
I think the actual idea that Torus should rotate on z axis.
Rotation you can see here.
http://www.kkrawal.20m.com/aw.html
Even though it is not that model, but I am happy that I have the opportunity to learn a lot of new things while creating this.