Şekil 7.8 Bağlantı noktasının nesne ile ilişkilendirilmesi (Point3_XYZ)
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- At Arabası Tekerleği Uygulaması (İki Nesne Arasına Çizilen Çizgilerin Bağlantı Noktalarının Nesnelerle İlişkilendirilmesi) (Point3_XYZ()): |
-- Bu kod satırı kitaptadır. |
dis.radius2 = dis.radius1*0.97 |
-- Bu kod satırı kitaptadır. |
cem = tube name:"cem" radius1:dis.radius2 height:dis.height sides:dis.sides |
cem.radius2 = cem.radius1*0.9 |
cem.pos = [0,cem.height/2,0] |
gob = torus name:"gob" radius1:.75 radius2:0.5 rotation:45 segments:48 sides:8 smooth:1 |
scale gob [1,1,2.5]
|
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
kap = wood() |
-- Bu kod satırı kitaptadır. |
malMet = Arch___Design__mi diff_color:(color 5 10 10) refl_weight:0.4 refl_gloss:0.5 |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
gob.material = malMet |
malAhs = standardMaterial diffuseMap:kap specularlevel:20 |
-- Bu kod satırı kitaptadır. |
cem.material = malAhs |
addModifier cem kapla
|
for i = 0 to 360 by 30 do |
( |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
addKnot ayak 1 #corner #line [cem.radius1*cos i,0,cem.radius1*sin i] |
addKnot ayak 1 #corner #line [gob.radius1*cos i,0,gob.radius1*sin i] |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
ayak.render_displayRenderMesh = true |
ayak.render_rectangular = true |
ayak.render_length = 0.4 |
ayak.render_width = 0.65 |
ayak.render_threshold = 100 |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
kon [2].controller = gob.pos.controller[2].controller |
kon [3].controller = gob.pos.controller[3].controller |
addModifier ayak kapla |
ayak.material = malAhs |
) |
Şekil 8.1 Pervane modelleme uygulaması (Mesh Modelleme)
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- Pervane Modelleme Uygulaması (4. Aşama: Kalınlık ve değiştirici uygulama:) |
nok = #() |
yuz = #() |
nokSay = 0 |
kanSay = 12 |
disYar = 100 |
icYar = 30 |
gen = 9 |
-- Bu kod satırı kitaptadır. |
( |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
nok3 = [icYar*cos(a),icYar*sin(a),-2.15] |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
nok6 = [(icYar*cos(a-15)),(icYar*sin(a-15)),-0.5] |
nok7 = [90*cos(a+gen),90*sin(a+gen),3.05] |
-- Bu kod satırı kitaptadır. |
append nok nok2 |
append nok nok3 |
append nok nok4 |
append nok nok5 |
append nok nok6 |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
append yuz [nokSay+1,nokSay+2,nokSay+5] |
append yuz [nokSay+4,nokSay+6,nokSay+7] |
append yuz [nokSay+2,nokSay+6,nokSay+7] |
append yuz [nokSay+1,nokSay+3,nokSay+7] |
append yuz [nokSay+3,nokSay+4,nokSay+7] |
append yuz [nokSay+2,nokSay+5,nokSay+6] |
append yuz [nokSay+3,nokSay+4,nokSay+5] |
append yuz [nokSay+4,nokSay+5,nokSay+6] |
-- Bu kod satırı kitaptadır. |
nokSay += 7 |
) |
-- Bu kod satırı kitaptadır. |
addModifier pervane (normalmodifier unify:true) |
addModifier pervane (uvwmap()) |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
showEndResult = true |
Şekil 8.2 Silindir modelleme uygulaması (Soyut mesh modelleme)
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- Silindir Modelleme Uygulaması: |
nok = #() |
yuz = #() |
nokSay = 0 |
-- Bu kod satırı kitaptadır. |
yarAlt = 100 |
yarUst = 100 |
yuk = 100 |
x1 = 0; y1 = 0; z1 = 0; x2 = 1; y2 = 1; z2 = 0; x3 = 1; y3 = 1; z3 = 0; x4 = 1; y4 = 1; z4 = 1; x5 = 1; y5 = 1; z5 = 1; x6 = 0; y6 = 0; z6 = 1 |
delete geometry |
-- Bu kod satırı kitaptadır. |
( |
nok1 = [x1*mik,y1*mik,z1*yuk] |
nok2 = [yarAlt*cos(x2*mik),yarAlt*sin(y2*mik),z2*yuk] |
-- Bu kod satırı kitaptadır. |
nok4 = [yarUst*cos(x4*mik),yarUst*sin(y4*mik),z4*yuk] |
-- Bu kod satırı kitaptadır. |
nok6 = [x6*mik,y6*mik,z6*yuk] |
append nok nok1 |
append nok nok2 |
append nok nok3 |
append nok nok4 |
append nok nok5 |
append nok nok6 |
append yuz [nokSay+2,nokSay+3,nokSay+5] |
append yuz [nokSay+1,nokSay +2,nokSay+3] |
append yuz [nokSay+2,nokSay+4,nokSay+5] |
append yuz [nokSay+4,nokSay+5,nokSay+6] |
-- Bu kod satırı kitaptadır. |
) |
-- Bu kod satırı kitaptadır. |
update silindir |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
( |
-- Bu kod satırı kitaptadır. |
) |
addModifier silindir (normalmodifier unify:true) |
if (silindir.numFaces) != (kenSay*4) do |
( |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
update silindir |
) |
addModifier silindir (turbosmooth iterations:2) |
addModifier silindir (shell inner_amount:5 outer_amount:5) |
addModifier silindir (turbosmooth iterations:2) |
-- Bu kod satırı kitaptadır. |
select silindir |
-- Bu kod satırı kitaptadır. |
showEndResult = true |
Şekil 8.3 Bağlantı noktalarını, bulundukları konuma göre taşıma (setVert)
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- Bu kod satırı kitaptadır. |
dis = converttomesh dis |
-- Bu kod satırı kitaptadır. |
( |
nb = getvert dis n |
-- Bu kod satırı kitaptadır. |
) |
update dis |
yumusatma = TurboSmooth() |
yumusatma.name = "yumusatma" |
addModifier dis yumusatma |
-- Bu kod satırı kitaptadır. |
Şekil 8.4 Limon sıkacağı modelleme uygulaması (setVert)
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- Limon Sıkacağı Modelleme Uygulaması (setVert): |
-- Bu kod satırı kitaptadır. |
convertToMesh limSu |
-- Bu kod satırı kitaptadır. |
( |
nokta = getVert limSu n |
-- Bu kod satırı kitaptadır. |
setVert limSu n nokta |
) |
-- Bu kod satırı kitaptadır. |
addModifier limSu cokertme |
cokertme.Bulge_amount = -1.75 |
cokertme.Bulge_Curviture = 1.5 |
-- Bu kod satırı kitaptadır. |
addModifier limSu dilimleme |
dilimleme.Slice_Type = 3 |
yumusatma = turbosmooth() |
addModifier limSu yumusatma |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
Şekil 8.5 Bağlantı noktalarını silerek modelleme uygulaması (deleteVert)
rollout nokSilMeshMod "Nokta Silerek Mesh Modelleme" width:270 height:90 |
( |
-- Bu kod satırı kitaptadır. |
spinner uzSeg "Uzunluk Segment Sayisi: " type:#integer range:[1,64,13] |
spinner GenSeg "Genislik Segment Sayisi: " type:#integer range:[1,64,20] |
spinner YukSeg "Yukseklik Segment Sayisi: " type:#integer range:[1,64,20] |
hyperlink baglan "Nadir AKSOY" color:(color 0 0 255) address:"http://www.nadiraksoy.com" offset:[-15,0] |
label surum "Surum: 1.0 (26-03-2010)" |
-- Bu kod satırı kitaptadır. |
( |
-- Bu kod satırı kitaptadır. |
prizma = box name:"prizma" LengthSegs:uzSeg.value WidthSegs:GenSeg.value HeightSegs:YukSeg.value |
convertToMesh prizma |
-- Bu kod satırı kitaptadır. |
( |
-- Bu kod satırı kitaptadır. |
) |
-- Bu kod satırı kitaptadır. |
addModifier prizma (kalinlik = shell name:"kalinlik" outerAmount:1.5) |
addModifier prizma (yumusatma = turboSmooth name:"yumusatma" iterations:2) |
-- Bu kod satırı kitaptadır. |
select prizma |
max pancamera |
) |
on nokSilMeshMod open do olus() |
on oran changed val do olus() |
on uzSeg changed val do olus() |
on GenSeg changed val do olus() |
on YukSeg changed val do olus() |
) |
createDialog nokSilMeshMod |
Şekil 8.6 Su çarkı modelleme uygulaması (Kenar yükseltme (extrudeEdges))
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- Silindirden Su Çarkı Modelleme Uygulaması (Kenar Yükseltme (extrudeEdges)): |
-- Bu kod satırı kitaptadır. |
suCarki.allEdges = true |
select suCarki |
max Modify mode |
subObjectLevel = 2 |
kenSec = #() |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
meshop.extrudeEdges suCarki kenSec 15.0 |
kalinlik = shell() |
addModifier suCarki kalinlik |
kalinlik.outer_amount = 1 |
rotate suCarki 90 x_axis |
-- Bu kod satırı kitaptadır. |
viewport.setShowEdgeFaces true |
Şekil 8.7 Raf modelleme uygulaması (Kenar yükseltme (extrudeEdges))
-- Yazan: Nadir AKSOY (http://www.nadiraksoy.com) |
-- Silindirden Raf Modelleme Uygulaması (Kenar Yükseltme (extrudeEdges)): |
-- Bu kod satırı kitaptadır. |
raf.allEdges = true |
-- Bu kod satırı kitaptadır. |
max Modify mode |
subObjectLevel = 2 |
kenSec = #() |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
append kenSec (((yuz-1)*3)+kenar) |
-- Bu kod satırı kitaptadır. |
kalinlik = shell() |
addModifier raf kalinlik |
kalinlik.outer_amount = 1.5 |
Şekil 8.9 Balon modelleme uygulaması (Yüzleri yükseltme (extrudeFace))
balon = sphere() |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
rotate balon 180 x_axis |
-- Bu kod satırı kitaptadır. |
yumusatma = turbosmooth() |
addModifier balon yumusatma |
update balon |
Şekil 8.10 Ok modelleme uygulaması (Yüzleri yükseltme (bevelFaces))
-- Bu kod satırı kitaptadır. |
convertToMesh okIs |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
update okIs |
addModifier okIs (NormalModifier unify:true) |
addModifier okIs (Smooth auto:true) |
addModifier okIs (Shell()) |
convertToMesh okIs |
Şekil 8.11 Sehpa modelleme uygulaması (Yüz çökertme (collapseFaces))
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
convertToMesh sehpa |
-- Bu kod satırı kitaptadır. |
simetri = Symmetry() |
-- Bu kod satırı kitaptadır. |
simetri.axis = 2 |
simetri.flip = false |
yumusatma = TurboSmooth() |
addModifier sehpa yumusatma |
yumusatma.iterations = 0.5 |
-- Bu kod satırı kitaptadır. |
Şekil 8.15 Bomba uygulaması (Kenarları yükseltme (extrude))
-- Bu kod satırı kitaptadır. |
kenarSayisi = bomba.numverts+bomba.numfaces-2 |
-- Bu kod satırı kitaptadır. |
bomba.edgeExtrudeWidth = 2 |
kenarSecimKumesi = #() |
-- Bu kod satırı kitaptadır. |
append kenarSecimKumesi i |
-- Bu kod satırı kitaptadır. |
select bomba |
max Modify mode |
subObjectLevel = 2 |
bomba.buttonOp #extrude |
-- Bu kod satırı kitaptadır. |
bomba.buttonOp #extrude |
yumusatma = TurboSmooth() |
yumusatma.name = "yumusatma" |
addModifier bomba yumusatma |
yumusatma.iterations = 2 |
-- Bu kod satırı kitaptadır. |
kaplamaYerlestirme.name = "Kaplama Yerlestirme" |
addModifier bomba kaplamaYerlestirme |
kaplamaYerlestirme.maptype = 4 |
deselect bomba |
Şekil 8.16 Kap modelleme uygulaması (Kanal açma (bridgeSegments))
-- Bu kod satırı kitaptadır. |
convertToPoly kap |
move kap.verts [#{1..17}] [0,0,-35] |
move kap.verts [#{18..34}] [0,10,0] |
move kap.verts [#{35..49}] [0,-5,-10] |
-- Bu kod satırı kitaptadır.
|
move kap.verts [#{kap.numverts}] [0,0,5] |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
addModifier kap (kalinlik = shell name:"kalinlik") |
kalinlik.outerAmount = 1 |
yumusatma = TurboSmooth() |
yumusatma.name = "yumusatma" |
addModifier kap yumusatma |
yumusatma.iterations = 2 |
kaplamaYerlestirme = uvwmap() |
kaplamaYerlestirme.name = "Kaplama Yerlestirme" |
addModifier kap kaplamaYerlestirme |
kaplamaYerlestirme.maptype = 1 |
update kap |
Şekil 8.17 Boya kabı modelleme uygulaması (Yüz yükseltme (extrudeFaces))
-- Bu kod satırı kitaptadır. |
boyaKabi = convertToPoly boyaKabi |
-- Bu kod satırı kitaptadır. |
( |
-- Bu kod satırı kitaptadır. |
-- Bu kod satırı kitaptadır. |
) |
-- Bu kod satırı kitaptadır. |
kalinlik.innerAmount = 3 |
kalinlik.outerAmount = 0.5 |
yumusatma = TurboSmooth() |
yumusatma.name = "yumusatma" |
addModifier boyaKabi yumusatma |
yumusatma.iterations = 4 |
-- Bu kod satırı kitaptadır. |
kaplamaYerlestirme.name = "Kaplama Yerlestirme" |
addModifier boyaKabi kaplamaYerlestirme |
kaplamaYerlestirme.maptype = 4 |
-- Bu kod satırı kitaptadır. |
Şekil 8.18 İnsan modelleme uygulaması (Poly Modelleme)
.pdf formatındaki kod dosyası buradan indirilebilir.
Şekil 8.19 Tabure modelleme uygulaması (ProBoolean)
-- Bu kod satırı kitaptadır. |
koni = cone radius1:6 radius2:4 Height:8 HeightSegs:1 sides:20 capsegs:6 |
-- Bu kod satırı kitaptadır. |
prizma.material = standard diffuse: (color 255 200 100) |
Başa Dön
|