Recursive shapes

I need to build numbers using Dash Blocks, see
www.itonlytakes1.org, and I am not sure how ActionScript 3.0 stores
Sprites. If a filled rectangle is the "units shape", then the base
number system 9 will have 9 of these per unit in the 10 place with
in an oddly shaped nine container. The number 4753 base 9 would
have over three thousand of these little rectangles in the 1000
place alone. Recursion makes incredible sense to build the
self-similar figures but I do not want to overwhelm the Flash
Player on slower machines manipulating tens of thousand graphic
elements. Any data on this topic would be greatly appreciated. I
did not find any searching for "recursive shapes" or "recursive
sprites".

I am developing a new foundation for math that enables
students to recognize integers using color and shapes: Dash Blocks.
The fundamental unit is a 1 x 4 rectangle. Placing ten of these
units together in a rectangular container in two columns of five
rows with a spacing of two between units equates to a 8 x 16
'container' rectangle. During initial training a student is exposed
to only one container of 0 to 9 units. However, the shape was used
because these containers, when full (i.e. 10 units within) can be
placed together in the same 2 x 5 pattern in a 64 x 256 container
(100's place). Repeating this pattern once more yields 1000's place
in a 512 x 2048 container. At this point, most displays can not
contain all four sizes BUT using (and demonstrating) scaling, akin
to looking down a street at taller and taller buildings, I can
scale these sizes to fit on the screen. This enables eventually
using them for Simple Math. In my classroom I have students that
can add 30 digit integers faster than a calculator using this
method. My desire is to get it onto the web. Please visit
www.itonlytakes1.org to see Base Ten containers. I believe if you
peruse the site by clicking on the Read More in the bottom right
corner, you'll understand more.
I am attaching my current code so: 1) you can more clearly
see where I am code wise, and 2) that you'll see my struggles with
learning ActionScript 3.0, CS3 Master Suite, and O.O.P. all at the
same time.

Similar Messages

  • How to use recursion with images

    Ok, for this program I'm trying to recursively repeat an image 3 times with varying widths and heights, and I don't know how to do that with images. With rectangles and other shape objects it's easy because all I had to do was override the draw method, but with images I'm not sure what to override to allow me to repeat the drawing of it with a different height and width. Any help would be greatly appreciated.

    Would I be able to work that in with recursion? Currently I have a JPanel with the paintComponent method being overridden, and I've tried setting up the paintComponent method to call itself to repaint the image, but I've realized everytime I resize the application's window paintComponent gets called again making the images go out of site. Is there a way to override the drawImage method to allow me to change the width and height of the image without causing the panel to repaint itself?

  • Dvi to video adapter changes shape

    When I plug my DVI to Video adapter into my macbook pro, all of the displays change shape, and no matter what resolution I choose, it won't go back to it's true size.   When I try a DVI to vga adapter, it works fine.

    Try starting the Mac in Safe mode.
    http://support.apple.com/kb/HT1455
    Hopefully that will result in a usable screen. If it does, go into Displays Preferences and change the resolution to what it was when you had things working properly before. Then restart normally and the resolution selection made under Safe mode should persist through the normal restart.

  • Trying to fill a shape or change text colour-it is always grey instead of the colour I picked?

    I have been working on a file and whenever I have a couple of shapes and some text. When I try to change the fill of the shape or change the text colour it is always changing to grey. It will let me pick a colour, but the box at the bottom(foreground/background box) is always grey as well. Please help.

    THANK YOU SO MUCH BARBARA! I really appreciate you taking  the time to reply to my simple problem(eventhough at the time it was so frustrating). Thanks again. Leanne

  • How can I implement a recursive update within triggers?

    Given
    INSTANCE (table)
    INST_ID
    etc.
    INSTANCE_STRUCTURE (table)
    PARENT_ID (fk to INST_ID)
    CHILD_ID (fk to INST_ID)
    And that I COULD write code which recursively navigates the hierarchy (ie. START WITH parent_id = ? CONNECT BY PRIOR child_id = parent_id) and issues UPDATEs to each "child" along the way, thereby propogating the desired update, how can I accomplish the same thing using triggers?
    Keep in mind I am using Oracle 7.3 and I have no choice. Also, the DBA is very difficult to get a hold of and I have no idea if there may be some server settings which are preventing some of my attempts from succeeding.
    Of course the simplest method is to make an update trigger on INSTANCE select all CHILD_ID from INSTANCE_STRUCTURE and issue UPDATE to each which, in turn, would invoke the same trigger, however, we can't have a mutating table, now can we?
    Next, I tried the old global variable in a package bit. That's when I first started getting this "end of channel" business which essentially disconnects me from Oracle (while using SQLPlus). I started to debug that, and then other users started getting errors ... apparently due to the global variable being global ACROSS sessions ... which I did not expect (correct me if I'm wrong and I can try it again), however, due to the amount of data I'm dealing with in any one particular line of hierarchy, I'm not sure I wouldn't get an error anyhow ... particularly if I have to maintain a global array for everyone at once. Anyhow, it was during that, that I realized the "too many open cursors" thing and so I started working with START WITH CONNECT BY to identify all rows which must be dealt with.
    Then, I tried setting up some new tables (as opposed to global variables) in which I would identify userenv('sessionid') and other data so that a BEFORE UPDATE, FOR EACH ROW trigger could check to make sure that the AFTER UPDATE trigger had not begun yet (IOW, not recursing yet). Basically, everything's fine until the AFTER UPDATE trigger tries to apply UPDATEs for the children (identified from a cursor on START WITH CONNECT BY) ... then I get the "end of channel" thing again.
    Obviously, this whole thing is an attempt to denormalize some data for performance reasons.
    Any help would be appreciated.
    Thanks.

    Nevermind, I figured somethin' out.

  • LACK OF FULL PEN TOOL FUNCTIONALITY WHEN CREATING A SHAPE LAYER

    Hello, I'm going through Chris Meyer's video course on being an AE apprentice and have spent over an hour on the following issue.
    Here is what I know.
    I know I am trying to create a shape layer, not a mask, to create a frame to surround the video of the green field on the attached screenshot.  Therefore, I pressed "F2" to make sure I am doing so.
    I want to define the borders of this picture frame by using the pen tool to draw a path on the layer entitled "Windy Peak".
    I have highlighted that layer in my timeline.
    This video was pasted on to a placeholder shape that I had created using Command Option "/" on my Mac.
    I do have limited use of the pen tool, because it displays properly when I hover it above the borders of the video to be framed.
    But I lack access to the toolbar controls I want to complete my assignment.
    For example, I would like to create a gradient to define the internal coloration of this frame, but I have no use of the eyedropper when I click on the Color Picker.
    Also, I am unable to access or manipulate any of the standard fill or stroke options for use of my pen.
    This is what I know.  
    Thanks for your help!   Matt
    Message was edited by: Matt Dubuque to add the fact that the video had been pasted on to a placeholder shape image by pressing Command Option "/" on my Mac.

    Thanks for pitching in Todd and Rick, I appreciate it very much.
    As previously stated, I do have use of the pen tool, but it only has limited functionality as demonstrated by the path I created on the green meadow.  My Tools Panel remains activated .
    My core problem remains that I am unable to adjust the fill or stroke settings for my pen.
    I have tried changing and resetting various work spaces and this has not helped.
    I'm scratching my head here.
    Matt

  • I would like to downgrade to the older version of the Adobe Shape App Version 1.2.0. Can I please be provided with a link in order to download the older version?

    I would like to be provided with a download for the older version of adobe shape 1.2.0 please!

    If you've been backing up to your local iTunes library, check your APPS pane to see if you have an older version of Shape stored locally. If you do, you can delete Shape from your phone, connect your phone to your computer, and drag the older version from your iTunes library onto your device. That's what I did to go back to the older version, which produced shapes that work much better for my purposes.
    Adobe, it seems like with the newest version of Shape, you made DRASTIC changes to the way the app processes images into shapes. Is there any way for us to opt for the older version of processing? Or to toggle between the two?

  • How can I create a Frame & dialog box with a desired shape & look ?

    Hellow !
    Currently I am writing an application that need your help.
    I need a complete code to create a custom JFrame & JDialog.
    Objective:
    1) The frame & Dialog box might not be in a rectangular shape.
    2) Their visible area [ Title bar(With my new icon),outer edge and iconifying,deiconifying & window closing buttons ]
    would be as I wish.
    As an instance, I mean to say it should looks something like Widows Media Player's(XP version) main window.
    My Operating System: Windows XP

    I think (I have never tried it) that the following link provides the kind of api you are looking for :
    http://www.l2fprod.com/
    As far as I know, it's based on the use of a custom look and feel called SkinLF.
    But due to the nature of your question and based on the assumption that people here are not going to do all the work for you, I would strongly advise you to start with the Swing tutorial :
    http://java.sun.com/docs/books/tutorial/uiswing/

  • What is the difference between Create shapes or masks from text characters?

    What is the main difference between Create shapes or masks from text characters and why use one over the other, or when is one preferred over the other?
    I am still fairly new to AE and am trying to better understand this, or can you point me to where i might look for the answer?
    CS5 if that make a difference.

    One creates masks, the other creates shape layers. There are properties that you can animate with shape layers that are not available to masks. There are also a few things you can do with masks that you can't with shape layers.
    I'd suggest you take a look at the help files or do a Google Search on After Effects Shape Tutorials.

  • Is it possible to convert text captions to Smart Shapes?

    Hello,
    I have a collegue that is using Cp 5 to record software simulations which then need to be brought into Cp6. The problem is that our standards (for software simulations) employ Smart Shape call outs (not the Cp 5.5 and earlier text captions).
    Is it possible to convert these text captions into our themed Smart Shapes either automatically inside Captivate 6 or by modifying the content within the CPTx file?
    Thank you,
    Shawn

    Hello Lilybiri,
    As always you are awesome! :-)
    >I don't believe an automatic switch will be possible, because smart shapes are totally different objects.
    I understand because there are a huge variety of shapes in either format. But I suspect that it should be easy to convert a text caption from any style to one specified smart shape style.
    Actually, I am asking before the simulations get started. So nothing has been done yet. I am unsure what you are suggesting I should do in the preferences under Cp 5.5. Are you suggesting that there is a way to convert 'some format' of text callouts, in a Cp5.5 demonstration simulation, to Smart Shapes in Cp6?
    >but since you already have created the simulations, it has to be done manually. Hoping for you that
    >someone has a bright idea, but I do not see one immediately.
    For anyone else in this situation, it would be handy to have a solution (rather than painstakingly convert each manually).
    I am wondering if this might be a relatively easy search/replace within one of the xml files within the CPTx file. I'm going to look at this tonight.
    Thanks for your assist.

  • A better way to rotate a shape

    I need a way to easily rotate several Ellipse2D objects. The approach I'm using is not working because it's rotating the entire coordinate system in my Canvas object:
    public void paint(Graphics g) {     
    Graphics2D g2 = (Graphics2D) g;          
    Ellipse2D.Double e = new Ellipse2D.Double(220.0, 75.0, 47.0, 30.0);
    AffineTransform rotate45 =
    AffineTransform.getRotateInstance(Math.toRadians(161.5),
    220.0, 75.0);
    g2.setTransform(rotate45);
    g2.draw(e);
    } // end paint
    Is there something better to use other than AffineTransform that will allow me to rotate just the shape itself?
    thanks,
    Eric

    You can still use AffineTransform. There is a method called createTransformedShape and it does what you want.
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/geom/AffineTransform.html#createTransformedShape(java.awt.Shape)
    Ellipse2D e = ...
    AffineTransform rotate45 = ...
    e = (Ellipse2D) rotate45.createTransformedShape(e);
    ...

  • How to find square root, log recursively???

    I need to find the square root of a number entered recursively and log as well. Your help would be greatly appreciated. Thanks in advance!
    import java.io.*;
    /**Class provides recursive versions
    * of simple arithmetic operations.
    public class Ops2
         private static BufferedReader in = null;
         /**successor, return n + 1*/
         public static int suc(int n)
              return n + 1;
         /**predecessor, return n - 1*/
         public static int pre(int n)
              if (n == 0)
                   return 0;
              else
                   return n - 1;
         /**add two numbers entered*/
         public static int add(int n, int m)
              if (m == 0)
                   return n;
              else
                   return suc(add(n, pre(m)));
         /**subtract two numbers entered*/
         public static int sub(int n, int m)
              if (n < m)
                   return 0;
              else if (m == 0)
                   return n;
              else
                   return pre(sub(n, pre(m)));
         /**multiply two numbers entered*/
         public static int mult(int n, int m)
              if (m == 0)
                   return 0;
              else
                   return add(mult(n, pre(m)), n);
         /**divide two numbers entered*/
         public static int div(int n, int m)
              if (n < m)
                   return 0;
              else
                   return suc(div(sub(n, m), m));
         /**raise first number to second number*/
         public static int exp(int n, int m)
              if (m == 0)
                   return 1;
              else
                   return mult(exp(n, pre(m)), n);
         /**log of number entered*/
         public static int log(int n)
              if (n < 2)
                   return 0;
              else
                   return suc(log(div(n, 2)));
         /**square root of number entered*/
         public static int sqrt(int n)
              if (n == 0)
                   return 0;
              else
                   return sqrt(div(n, ));
         /**remainder of first number entered divided by second number*/
         public static int mod(int n, int m)
              if (n < m)
                   return 0;
              else
                   return mod(div(n, pre(m)), m);
         public static void prt(String s)
              System.out.print(s);
         public static void prtln(String s)
              System.out.println(s);
         public static void main(String [ ] args)
              prtln("Welcome to the amazing calculator");
              prtln("It can add, multiply and do powers for");
              prtln("naturals (including 0). Note that all the");
              prtln("HARDWARE does is add 1 or substract 1 to any number!!");
              in = new BufferedReader(new InputStreamReader ( System.in ) );
              int It;
              while ( (It = getOp()) >= 0)
                   prt("" + It + "\n");
            private static int getOp( )
            int first, second;
            String op;
            try
                System.out.println( "Enter operation:" );
                do
                    op = in.readLine( );
                } while( op.length( ) == 0 );
             System.out.println( "Enter first number: " );
                first = Integer.parseInt( in.readLine( ) );
                System.out.println( "Enter second number: " );
                second = Integer.parseInt( in.readLine( ) );
             prtln("");
             prt(first + " " + op + " " + second + " = ");
                switch( op.charAt( 0 ) )
                  case '+':
                    return add(first, second);
                  case '-':
                       return sub(first, second);
                  case '*':
                    return mult(first, second);
                  case '/':
                       return div(first, second);
                  case '^':
                    return exp(first, second);
                  case 'v':
                       return log(first);
                  case 'q':
                       return sqrt(first);
                  case '%':
                       return mod(first, second);
                  case 's':
                       return suc(first);
                  case 'p':
                       return pre(first);
                  default:
                    System.err.println( "Need +, *, or ^" );
                    return -1;
            catch( IOException e )
                System.err.println( e );
                return  0;
    }

    Hi,
    Is there any one to make a program for me in Turbo
    C++ for Dos, which can calculate the square root of
    any number without using the sqrt( ) or any ready
    made functions.
    The program should calculate the s.root of the number
    by a formula or procedure defined by the user
    (programmer).
    Thanks.This is a Java forum!
    If you want Java help:
    1. Start your own thread.
    2. Use code tags (above posting box) if you post code.
    3. No one will write the program for you. We will help by answering your questions and giving advice on how to fix problems in code you wrote.
    4. The formula you need to implement is given above by dizzy.

  • Draw an visio shape as an .vdx file and render the same in a IE browser

    I had generated an Visio Diagrams getting input from the excel file and stored it in an local path.
    private void DynamicVisio_Load(object sender, EventArgs e)
                string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= 'c:\\Test\\FullData3.xls';Extended Properties='Excel 8.0;HDR=Yes;'";
                string sQuery = "select * from [Customer1_Server$] order by Name";
                DataSet objExcelDS = new DataSet();
                OleDbDataAdapter objDA = new OleDbDataAdapter(sQuery, strConn);
                objDA.Fill(objExcelDS);
                double dblX1 = 0.5d;
                double dblY1 = 10.3d;
                double dblX2 = 2.258d;
                double dblY2 = 6.8d;
                String sText = "";
                String sFilePath = "";
                String sDisk = "";
                String[] sArray;
                String[] separators = { "," };
                String sPicturePath = "C:\\Test\\test.png";
                String sIPRangeValue = "";
                Visio.Application objVApp = new Microsoft.Office.Interop.Visio.Application();
                objVApp.Documents.Add(@"C:\Test\CustomTemplate\ServerTemplate.vsd");// add a document
                for (int i = 0; i < objExcelDS.Tables[0].Rows.Count; i++)
                    Visio.Page objVAPage = objVApp.ActiveDocument.Pages.Add();
                    objVApp.Documents.Add(@"C:\Test\CustomShapes\MyShapes.vss");// add a document
                    Visio.Document objVADoc = objVApp.ActiveDocument;// set the working  document to our new document
                    Visio.Masters objVMasters = objVADoc.Masters;
                    Visio.Master objVMaster = objVMasters.get_ItemU("CustomTab");
                    Visio.Shape objTabShape = objVAPage.Drop(objVMaster, 8.24d, 5.54d);
                    objTabShape.Text = objExcelDS.Tables[0].Rows[0]["VLAN"].ToString(); ;
                    //set the Shape Width
                    objTabShape.get_CellsSRC(
                            (short)Microsoft.Office.Interop.Visio.VisSectionIndices.
                            visSectionObject,
                            (short)Microsoft.Office.Interop.Visio.VisRowIndices.
                            visRowXFormIn,
                            (short)Microsoft.Office.Interop.Visio.VisCellIndices.
                            visXFormWidth).ResultIU = 16.0;
                    //set the shape height
                    objTabShape.get_CellsSRC(
                       (short)Microsoft.Office.Interop.Visio.VisSectionIndices.
                       visSectionObject,
                       (short)Microsoft.Office.Interop.Visio.VisRowIndices.
                       visRowXFormIn,
                       (short)Microsoft.Office.Interop.Visio.VisCellIndices.
                       visXFormHeight).ResultIU = 10.6;
                    Visio.Shape objOuterBox = objVAPage.DrawRectangle(dblX1, dblY1, dblX2, dblY2); // Outer Rectange
                    sFilePath = "C:\\Temp\\ServerTemplate"+i.ToString()+".vsd";
                    objVApp.ActiveDocument.SaveAsEx(@sFilePath, (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visSaveAsWS);
    but I need to generate the same visio diagram over the web application using the Response.ContentType. ie.
    context.Response.ContentType = "application/vdx.visio";
    context.Response.AddHeader("content-disposition", String.Format("attachment;filename=\"{0}.vdx\"", fileName));
    Pls give me an idea about it along with any example if possible.
    Thank you.

    Hi,
    This Visio forum is for general questions. Since your issue is related to developing, I advise you to post this issue on Office for Developer forum.
    https://social.msdn.microsoft.com/Forums/office/en-US/home?category=officedev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners
    who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Best regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Confusion between references in recursion

    Hi all,
    I am trying to create B+ trees for a database. My algorithm for the insert function is:
    void insert(page_no, entry, newchildentry )
    if page_no is not a leaf ,say N
    find i such that Ki <= entry's key value < K i+1   //choose subtree
    insert(newPage(i), entry,newchildentry )
    if newchildentry is null, return;
    else
              if N has space, insert the newchildentry, set it to null and return
             else
             split the page in half, the newchildentry is set to a new value
             if N is the root , do some extra things return;
    if  page_no is a leaf, say L
    if  L has space, insert entry on to it, set newchildentry to null and return;
    else split L in half, populate the newchildentry to some new values
    return;
    }The problem that i am facing is that newchildentry is being populated by some values in the "if page_no is a leaf, say L" part and on collapsing the recursion, these values are being lost and I can't figure what the problem is. i'm new to java even though i have programmed in c/c++ before and i think this would work. is it because java is maintaining different placeholders for the newchildentry?
    thanks.
    ~dang_it

    Hi all,
    I am trying to create B+ trees for a database. My
    algorithm for the insert function is:
    void insert(page_no, entry, newchildentry )
    if page_no is not a leaf ,say N
    find i such that Ki <= entry's key value < K i+1
    //choose subtree
    insert(newPage(i), entry,newchildentry )
    if newchildentry is null, return;
    else
    if N has space, insert the newchildentry,
    hildentry, set it to null and return
    else
    split the page in half, the newchildentry is
    dentry is set to a new value
    if N is the root , do some extra things
    ra things return;
    if  page_no is a leaf, say L
    if  L has space, insert entry on to it, set
    newchildentry to null and return;
    else split L in half, populate the newchildentry to
    some new values
    return;
    }The problem that i am facing is that newchildentry is
    being populated by some values in the "if page_no is
    a leaf, say L" part and on collapsing the recursion,
    these values are being lost and I can't figure what
    the problem is. i'm new to java even though i have
    programmed in c/c++ before and i think this would
    work. is it because java is maintaining different
    placeholders for the newchildentry?
    thanks.
    ~dang_itIn the code that is failing, what type is newchildentry. You need to be aware that objects are not passed in the argument list. A copy of the object reference is passed. When the method finishes, even if the object contents have changed, the reference has not. So, to say that in some case you set newchildentry to null does not change the newchildentry object reference in the calling method.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 'select all' in pages 'shapes' does not work

    When drawing 2-D floor plans using Pages / Shapes......the 'Select All' function does not work !
    I am uisng Mountain Lion, v 10.8.3
    Any help will be appreciated
    Thanks
    Sheldon

    Hi Sheldon,
    Is your document based on a Page Layout Template?
    In Pages, a floor plan is more suited to a Page Layout document (which mimics a drawing app) rather than a Word Processing document.
    Here is a document that I created with Template Chooser > Page Layout > Blank.
    I added some Shapes and Text Boxes.
    'Select All' (command a) selected everything:
    I hope this helps.
    Regards,
    Ian.

Maybe you are looking for

  • HR-ABAP: Defaulting Radio Button on Selection Screen of PNP LDB

    Hi all, I am using PNP LDB (Logical Database) for program which is used for Payroll Results. Now I have a requirement wherein it is necessary to select 'Up to today' as default on the selection screen. We are having 4.7C version of SAP. I tried follo

  • How to define configurable Properties in WAS - CE 7.1 ??

    Hi, You can visit NetWeaver Administrator Web Page of your server: [http://<server>:<port>/nwa|http://<server>:<port>/nwa] You must have Admin rights to do so. And you can see/edit properties from various tabs and not under single tab. Reason: All th

  • Accounting Document for Mvt 561

    Hi Sap Gurus, Could any one help me out how i can create an accounting document for the initial load Movement type  561, and 601. Pleaase could any one help me out regarding this issue. Thanks' Edie

  • Can't install mpkg files anymore

    I'm having a problem installing mpkg files - specifically, the newest ipod update. I downloaded the newest ipod updater file, clicked on the mpkg file to try and install it, and a message popped up indicating that it could not find the program to ins

  • Upload to Createspace fails despite cable internet

    For some odd reason, I am unable to upload to CreateSpace, despite high speed internet, good files, etc. I can upload the same files form all other available computers. Nothing I know of is set to disallow this. There are no known physical obstacles