Moderators: SecretSquirrel, just brew it!
FireGryphon wrote:I really know nothing about graphics programming, but it would be great to teach my kids a few things and let their imaginations run wild. I'm looking for some direction here. I'll gladly teach myself a language to then teach to my kids, but I haven't the time to search around for a suitable language to start with. Any ideas here are greatly appreciated!
just brew it! wrote:Maybe Python? The Python Tkinter canvas widget is a pretty reasonable way to do basic graphics. It's also Open Source and cross-platform, if you want to use it as an opportunity to introduce the students to those concepts as well. A pre-written skeletal Python app with a method which can be filled in with arbitrary code to draw stuff on a canvas would suit your purposes, I think.
global_settings { assumed_gamma .9 number_of_waves 3 max_trace_level 10 }
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "woods.inc"
#include "stones.inc"
camera {
location <100.0, 120.0, -240.0>
look_at <0, 20, 0>
angle 35
}
light_source { <40.0, 200.0, -200.0> color White }
#declare T_Glass = texture {
pigment { color red 1.0 green 1.0 blue 1.0 filter 0.99 }
finish {
ambient 0.0
diffuse 0.0
reflection 0.1
phong 0.3
phong_size 90
}
}
#declare I_Glass =
interior {
ior 1.25
caustics 2
fade_distance 40
fade_power 1
}
#declare Logo = union {
text {
ttf "ariblk.ttf" "The" 1, 0
scale <0.4 0.4 .4>
translate <-1.6, 0.25, -.3>
}
text {
ttf "ariblk.ttf" "Tech" .3, 0
translate <-0.8, 0, -.3>
}
text {
ttf "ariblk.ttf" "Report" .3, 0
translate <-1.7, -.9, -.3>
}
}
#declare SlabLogo = union {
object { Logo texture { T_Stone9 } finish { diffuse 1 specular 0.5 roughness .1}}
object { Cube scale < 2.0, 2.0, .15> texture { T_Stone41 }
finish { diffuse 1 specular 0.5 roughness .05} }
}
#declare CrystalBall = intersection {
object { sphere { <0, 0, 0>, 1 } }
object { sphere { <0, 0, 0>, 0.9 } inverse }
texture { T_Glass }
interior { I_Glass }
}
fog { distance 200 color Black }
plane {
y, 0
texture { T_Wood2 scale 7 }
finish { reflection 0.25 }
}
object { SlabLogo scale 20 translate <0, 40, 0> }
object { CrystalBall scale 10 translate <20, 35, -25> }


Flying Fox wrote:Wow that's nice JBI. I don't seem to find "Tech Report" in the code?
Flying Fox wrote:Wow that's nice JBI. I don't seem to find "Tech Report" in the code?
May be I should pick up this POV-Ray stuff. I have no idea the code size is that small? Not that I know anything about "Graphics programming" though (at first I thought it's more 2D rectangles, circles and stuff). Part of the reason I took engineering instead of mathematics is because of the "easier" math.

Flying Fox wrote:Replace that bubble with a magnifying glass we will have a 3D version of TR's new logo?
global_settings { assumed_gamma .9 number_of_waves 3 max_trace_level 10 }
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "woods.inc"
#include "stones.inc"
#include "metals.inc"
camera {
location <100.0, 120.0, -240.0>
look_at <0, 20, 0>
angle 35
}
light_source { <40.0, 200.0, -200.0> color White }
#declare T_Glass = texture {
pigment { color red 1.0 green 1.0 blue 1.0 filter 0.99 }
finish {
ambient 0.0
diffuse 0.0
reflection 0.1
phong 0.3
phong_size 90
}
}
#declare I_Glass =
interior {
ior 1.5
caustics 2
fade_distance 40
fade_power 1
}
#declare Logo = union {
text {
ttf "ariblk.ttf" "The" 1, 0
scale <0.4 0.4 .4>
translate <-1.6, 0.25, -.3>
}
text {
ttf "ariblk.ttf" "Tech" .3, 0
translate <-0.8, 0, -.3>
}
text {
ttf "ariblk.ttf" "Report" .3, 0
translate <-1.7, -.9, -.3>
}
}
#declare SlabLogo = union {
object { Logo texture { T_Stone9 } finish { diffuse 1 specular 0.5 roughness .1}}
object { Cube scale < 2.0, 2.0, .15> texture { T_Stone41 }
finish { diffuse 1 specular 0.5 roughness .05} }
}
#declare Ring = object {
intersection {
object { cylinder { <0, -.15, 0>, <0, .15, 0>, 1.05 } }
object { cylinder { <0, -.151, 0>, <0, .151, 0>, 1 } inverse }
}
}
#declare Handle = object {
cylinder { <0, 0, 0>, <2.5, 0, 0>, .125 }
}
#declare Lens = object {
sphere { <0, 0, 0>, 1 }
scale < 1.0, .05, 1.0>
}
#declare Magnifier = union {
object { Ring texture { T_Chrome_5E } finish { reflection 0.5 } }
object { Handle texture { T_Chrome_5E } finish { reflection 0.5 } translate <1, 0, 0 > }
object { Lens texture { T_Glass } interior { I_Glass } }
}
fog { distance 200 color Black }
plane {
y, 0
texture { T_Wood2 scale 7 }
finish { reflection 0.25 }
}
object { SlabLogo scale 20 translate <0, 40, 0> }
object { Magnifier scale 10 rotate < 90, 0, -35 > translate <22, 37, -30> }

just brew it! wrote:...and here it is with the magnifying glass! I know very little about lenses, and crudely modeled the lens as an ellipsoid (flattened sphere), hence the optical distortion at the edges. Note how the magnifier is built up out of its component bits -- ring, handle, and lens.
SecretSquirrel wrote:Back on topic... I'm afraid I don't have a good suggestion. Most real languages will probably take too much effort to get the basic programming concepts necessary to do any graphics of any sort.
GPU Gems is a compilation of articles covering practical real-time graphics techniques arising from the research and practice of cutting-edge developers. It focuses on the programmable graphics pipeline available in today's graphics processing units (GPUs) and highlights quick and dirty tricks used by leading developers, as well as fundamental, performance-conscious techniques for creating advanced visual effects. The contributors and editors, collectively, bring countless years of experience to enlighten and propel the reader into the fascinating world of programmable real-time graphics.

And now we're getting well afield of what you'd use to introduce 9th graders to the basics of programming.PRIME1 wrote:The first "GPU Gems" book is now available free online.
Biology -> Chemistry -> Physics, when a proper understanding can only be developed by reversing that order.
It is "(3D) graphics programming" not "graphics and then programming (macros)", no?bryanl wrote:Biology -> Chemistry -> Physics, when a proper understanding can only be developed by reversing that order.
oh, yes. this one. Forget Piaget. Think only content, not cognitive development. <snide> after all, everyone knows science is just a collection of facts,</snide>
ok.ok. back to k-12 teaching about computer thingies.
As far as cognitive development towards programming, teach algebra and typing. All else is only motivational.
For graphics programming, I'd start with a digital camera and GIMP. The theme is graphic arts for a school yearbook or some such. Along the way the need for learning about color, picture representation, lighting, composition, and so on is stimulated. Then you can get into macros to manipulate pictures. Then you start to get into what is going on. Then you can start to think about graphics programming.
but, then, that doesn't seem to be what the market wants. the market wants magic bullets and sees learning and skill development as mechanical process
whoops, getting cynical again. oh well

Users browsing this forum: No registered users and 3 guests