ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 18 Jul 2019 03:35:03 -0500Latex text in notebook and return lineshttp://ask.sagemath.org/question/47202/latex-text-in-notebook-and-return-lines/Hi
is there a way to display a text in notebook with return lines out of this heavy way ?:
show(LatexExpr(r" \
\text{ Late at night, guards on the battlements of Denmark's Elsinore castle}\\ \
\text{are met by Horatio, Prince Hamlet's friend from school.}\\ \
\text{The guards describe a ghost they have seen that resembles Hamlet's father,}\\ \
\text{the recently-deceased king. At that moment, the Ghost reappears,}\\ \
\text{and the guards and Horatio decide to tell Hamlet.}\
"))
ortolljThu, 18 Jul 2019 03:35:03 -0500http://ask.sagemath.org/question/47202/Number of line segments in a group - algorithmhttp://ask.sagemath.org/question/10252/number-of-line-segments-in-a-group-algorithm/Hi experts!
Im a newby SAGE, SciPy, Numpy and Python user.
I'm trying to write an algorithm that accounts for how many straight segment groups ('clusters') of a given dimension (dimension = number of lines that form the cluster).
Each line in my algorith is random-generated and characterized by his start point (xi,yi) and his end-point (xf,yf).
For example, in the image attached
http://subefotos.com/ver/?8818abc218ccd909f8c0bba71446c3b5o.png
there are: one cluster formed by 9 line segments, one cluster consists of four line segments, one cluster consists of five line segments, two cluster formed by three line segments, four cluster formed by two line segments and one cluster consists of one single line segments.
Until now i only could write a code that generates a matrix of NxN (where N = total number of line segments ). In this matrix, the element located in row A column B is 'True' if the segment A is cut with segment B, and its value is 'False' if that two segments are NOT intersect.
¿Any idea?
Waiting for your answers.
Thanks a lot!
mresimulatorTue, 18 Jun 2013 08:39:38 -0500http://ask.sagemath.org/question/10252/