Here's some code which makes 3-D cross-sections of an icosahedron.  It
might give some ideas for extensions.

<pre>
ico = polytopes.icosahedron()
ps = []
step = 2/10
for i in srange(-13/10,14/10,step):
    sdel = step/20
    mieqs = [x for x in ico.ieqs()] + [[-i,1,1,1],[i+sdel, -1,-1,-1]]
    ps.append(Polyhedron(ieqs = mieqs))
html('<h2>Slices of an icosahedron</h2>')
show(sum([ps[x].render_solid(opacity = .2, rgbcolor = (float(x)/len
(ps),0,1-float(x)/len(ps))) + ps[x].render_wireframe(rgbcolor = (float
(x)/len(ps),0,1-float(x)/len(ps)))  for x in range(len(ps))]), frame =
False)
</pre>
On May 15, 5:37 am, jason-s...@creativetrax.com wrote:
> Robert Bradshaw wrote:
> > I don't believe we have anything like this yet, but it seems it could
> > be (relatively) easily built on top of the new and very cool 3d
> > implicit plotting functionality.
>
> Also, the region parameter should be very useful for this (which
> basically implements nice clipping of 3d objects).  
> Seehttp://trac.sagemath.org/sage_trac/ticket/5514for a not-quite-finished
> patch.
>
> Jason
>
> > - Robert
>
> > On May 15, 2009, at 1:42 AM, Jurgis Pralgauskis wrote:
>
> >> Hello,
>
> >> stereometry needs imagination or more experience,
> >> to understand cross-sections and so on
>
> >> I found some interactive example
> >>http://www.learner.org/courses/learningmath/geometry/session9/
> >> part_c/index.html
>
> >> I'd like to have sage interact for solid construction and
> >> cutting_plane parameters
> >> and then view it around via jmol :)
>
> >> in school this is  mostly needed for parallelepiped or pyramid solids:
>
> >> mysolid = SomeSolid(apex_points_3D)
> >> # and I can get, mysolid.surface_planes()
> >> #so I'd expect to have algorithms which detect
>
> >> intersection = Intersection(mysolid, cutting_plane)
> >> # we get some 2D polygon,
> >> # probably first analytically find    intersection.lines
> >> # and then  solve the
> >> # self.segmets = self.endpoints (self.lines , self.mysolid)
> >> # for conic would be some different approach ...
>
> >> intersection.fill() # or draw() would draw some lines or color to
> >> show it
>
> >> what does sage have already, and what would need to be hacked?
>
> >> Thanks in advance :)
>
> >> ps.: just for reference
> >>http://en.wikipedia.org/wiki/Cross_section_(geometry)
> >>http://en.wikipedia.org/wiki/Conic_section
>
> >> --
> >> Jurgis Pralgauskis
> >> Don't worry, be happy and make things better ;)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to sage-edu@googlegroups.com
To unsubscribe from this group, send email to 
sage-edu+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to