VIEW FOR FUN!

I have created a class that continuosly creates dynamic images based on a fractal pattern. The image is so distorted it makes your vision go blurry and makes you feel dizzy. I find this interesting because every image it produces makes you feel sick.
Simple Steps:
1] Copy File: Target.java, Fractal.java
2] Compile File: Target.java
3] Execute: Target
Target.java
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import javax.swing.*;
public class Target extends JFrame
     private JMenuItem objItemExit;
     public Target()
          super("Target");
          getContentPane().add(new Fractal());
          pack();
          setResizable(false);
          setVisible(true);
          addWindowListener(new WindowAdapter() {
               public void windowClosing(WindowEvent argEvent) {
                    Destructor();
     public void Destructor()
          dispose();
          System.exit(0);
     public static void main(String [] argCommand)
          Target objTarget = new Target();
}Fractal.java
import java.awt.*;
import java.lang.*;
import java.util.*;
import javax.swing.*;
public class Fractal extends JPanel implements Runnable
     private int [][] iMap;
     private int iSize;
     private int iWidth;
     private int iHeight;
     private int iMax;
     private int iMin;
     private Thread objThread;     
     public Fractal()
          setPreferredSize(new Dimension(550, 550));
          iSize = 512;
          iWidth = 1;
          iHeight = 1;
          objThread = new Thread(this);
          objThread.start();
     public void run()
          while (true) {
               setMap();
               repaint();
               try {
                    objThread.sleep(2500);
               } catch (InterruptedException argException) {
     public void setMap()
          iMap = null;
          System.gc();
          Random objRandom = new Random();
          iMap = new int[iSize][iSize];
          iMap[0][0] = 0;
          for (int iD1 = iSize; iD1 > 1; iD1>>=1) {
               int iD2 = iD1>>1;
               int iAdd = objRandom.nextInt(iSize);
               for (int iY = 0; iY < iSize; iY += iD1) {
                    for (int iX = 0; iX < iSize; iX += iD1) {
                         iMap[iY][iX + iD2] = (sample(iX, iY) + sample(iX + iD1, iY)) / (2) + iAdd;
                         iMap[iY + iD2][iX] = (sample(iX, iY) + sample(iX, iY + iD1)) / (2) + iAdd;     
               for (int iY = 0; iY < iSize; iY += iD1) {
                    for (int iX = 0; iX < iSize; iX += iD1) {
                         iMap[iY + iD2][iX + iD2] = (sample(iX, iY) + sample(iX + iD1, iY) + sample(iX + iD1, iY + iD1) + sample(iX, iY + iD1)) / (4) + iAdd;     
          iMax = iMap[0][0];
          iMin = iMap[0][0];
          for (int ir = 0; ir < iSize; ir++) {
               for (int ic = 0; ic < iSize; ic++) {
                    if (iMap[ir][ic] > iMax) {
                         iMax = iMap[ir][ic];
                    if (iMap[ir][ic] < iMin) {
                         iMin = iMap[ir][ic];
     public int sample(int argX, int argY)
          return iMap[argY & (iSize - 1)][argX & (iSize - 1)];     
     public void paintComponent(Graphics argGraphic)
          int iColor = new Random().nextInt() % 3;
          int iShiftX = (getWidth() - (iSize * iWidth)) / 2;
          int iShiftY = (getHeight() - (iSize * iHeight)) / 2;
          argGraphic.setColor(Color.white);
          argGraphic.fillRect(0, 0, getWidth(), getHeight());
          int iColorShade = ((iMax - iMin) / 255) + 1;
          for (int ir = 0; ir < iSize; ir++) {
               for (int ic = 0; ic < iSize; ic++) {
                    switch (iColor) {
                    case 0:
                         argGraphic.setColor(new Color((iMap[ir][ic] - iMin) / iColorShade, 0, 0));
                         break;
                    case 1:
                         argGraphic.setColor(new Color(0, (iMap[ir][ic] - iMin) / iColorShade, 0));
                         break;
                    case 2:
                         argGraphic.setColor(new Color(0, 0, (iMap[ir][ic] - iMin) / iColorShade));
                         break;
                    default:
                         argGraphic.setColor(new Color((iMap[ir][ic] - iMin) / iColorShade, (iMap[ir][ic] - iMin) / iColorShade, (iMap[ir][ic] - iMin) / iColorShade));
                         break;
                    argGraphic.fillRect((ir * iWidth) + iShiftX, (ic * iHeight) + iShiftY, iWidth, iHeight);
}Please let me know what you think of it.
DeltaCoder

Ok, I let it run longer. Not every image is so bad. Just look straight into the middle and try to maintain eye focus.
DeltaCoder

Similar Messages

  • Ios 5 Update New Features says that iCal now has a week view for iPhone but after updating last weekend, I don't see any week view--just List, Day and Month..How do I get the week view?

    ios 5 Update New Features says that calendar now has a week view but after updating my iPhone 4 last weekend, I don't see any week view for iCal--just List, Day and Month as in the past. Is the weekly view available for iCal and if so, how do I access it?

    Rotate your phone to landscape.

  • HT201412 I cannot open the month of March 2013 in my iPad3 calendar. I can however see it in the year view for 2013 and I can view the daily and weekly calendars for March 2013. Any ideas what has gone wrong ? Thanks

    I have a new iPad3 and have found I cannot open the month of March 2013 when I tap on it. All other months open OK ! I can see March 2013 in the yearly view and I can open the individual days, and weeks, of March 2013 but I cannot see the whole month in the monthly view. When I try to open the monthly view for March 2013 it returns me to the start screen which shows all the apps etc and closes the Calendar app. Any guidance of what is going wrong and how it can be corrected. Thanks !

    Don't worry we have to start somewhere. Feel free to post your questions here, we learn from each other.

  • Create a Maintenance view for table T500P

    Hi Experts,
    We have a requirement where customer want an additional field in table T500P and for the same a custom maintenanve view has to be created.Moreover, If there is any update insert or change in the ZView/Ztable the same should be reflected in standard table T500P.
    Steps already taken :-
    We have created a ztable (copy of T500P ) and add the required custom field to it.
    We have also copied the view i.e V_T500P to our custom view and also use base table as T500P .
    We also create a foreign key for PERSA in Ztable and use T500P as check table for that with cardinality 1:1.
    To update the MOLGA & BUKRS field data in ztable we have set both the field as a primary key & create a foreign key with check table T500L & T001 & cardianality as 1:CN for key fields.
    In custom maintenance view we have set the realtionship of ztable t500l & t001 with the base table T500P.
    Now, if we are trying to maintain the view only T500P table is getting updated and Ztable is updated with only PERSA value.
    Please provide some directions for the resolution of this issue.
    Thanks,
    Pooja Goel.

    Scheduler007 --
    The view you selected by clicking File > Options > Project View is the default view for every new project you create from a blank project template.  This is a global option, so setting it from the checked out Enterprise Global file serves no purpose. 
    When you select a view as your default view, you will see that view applied to the blank project that is opened when you launch Microsoft Project 2010, and you will see it applied if you create new blank projects.  If you create enterprise templates for
    people to use in your organization, you should simply apply the view to the template that you want as the default so that users will see this view immediately when they create a new project from the template.  In addition, if you apply a view to an open
    project, close and check in the project, and then reopen the project, you will see the last view applied in that project (as Guillaume correctly points out).
    Beyond this, there is no method possible for the Project Server administrator to specify a default view for the Microsoft Project application used by the project managers in your organization.  This is an option each PM must set.  Hope this helps.
    Dale A. Howard [MVP]

  • Is there a continuous scrolling month view for ical, like outlook?

    is there a continuous scrolling month view for ical, like outlook?

    Not as far as I know - but maybe things are different in iOS (I'm on OS X)

  • Error while saving view for a report

    Hi All,
             I have transported queries to production and executing them from web, when I am saving the view for a report I get an error
    " The Object cannot not be processed due to a transport problem -  Notification Number RSWWW 240 "
    What could be the problem...please help
    Thanks
    Indraneel

    Check the OSS note 550760 regarding the issue.

  • Hey Guys, from Germany. I want to connect my iMac 21" with my Tv just for fun. Does anyone know, how it works. With a Hdmi adapter?

    Hey guys! I want to connect my Imac 21 " with my Tv just for fun. Does anyone know , how it works?

    Selecting the correct adapter and cable depends on which year model iMac you have and what inputs the TV has?
    Check the User's Guide that came with your iMac or your Spec's at > Apple - Support - Technical Specifications
    to see if your iMac has a Mini-DVI or Mini DisplayPort and then select that adapter with the correct connection for the TV.
    Example: if you have a 2010 or 2011 iMac and an HDMI ready TV, then you would want the > Moshi Mini DP to HDMI Adapter with Audio Support - Apple Store (U.S.)

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • Do I need to create a view for this?

    Hi Ihave got 2 tables emp and project
    In emp tabe:
    emp_no
    family name
    given name
    In porgect table:
    emp_no
    status(assigned,unassigned)
    start_date
    end_date
    emp_no Family_name given_name
    1 Smith John
    In project table same employee can have many assigement eg
    emp_no status start_date end_date
    1 assigned 01-may-08 01-july-08
    1 assigned 01-sep-08 01-july-09
    1 unassigned 01-july-09 01-oct-09
    In the form:
    there are 2 querable fields "project ends between field1(date) and field2(date)" which is used to
    retrive records which have end date between field1 and field2.
    The following fields are needed to get from database:
    emp.family_name emp.given_name project.start_date project.end_date No.of time assigned
    Requirements:
    1. project.start_date and project.end_date must be the latest project_end_date for the same emp
    so in the above sample date
    2. No. of time assigned is a count of total of number records which have status='assign'
    So for the given sample data the record expected after query would be(field1=01-jun-08 field2=02-july-09)
    emp.family_name emp.given_name project.start_date project.end_date No.of time assigned
    Smith John 01-sep-08 01-july-09 2
    What is the best approach to get:
    1 The lastest project(latest end_date) for the emp
    2. get No.of time assigned.
    Do I need to create a view for this? If yes, any sample sql code this this?
    Thanks for your help

    Hi W1zard,
    Thanks for your reply. Could you clarify the following points for me:
    1.) you could create a master block basing on your emp table and a detail block basing on your project table with the relation over emp_no. set the default_where clause of your detail block programmatically using
    set_block_property('project', default_where, 'status = ''assigned'' and <your_date_criteria>');
    Q1: where I pit this code? in pre-query trigger in detail block?
    2.) Of course you could create a view to join both of your tables if you don't want to use master detail blocks; Also do the join over emp_no
    create or replace force view v_emp as
    select emp.family_name, emp.given_name, project.start_date, project.end_date
    from emp, project
    where emp.emp_no = project.emp_no
    Q2 As I mentioned before, there are multipal entries for the same emp in project table and we only need the maching record from project table which has latest end_date. So I think I need something like
    max(project.end_date) somewhere in create view to make sure only one record for one employee.
    Also is there possible to include the no. of assigned field(select count(*) from project where status='assigned' and emp=emp_no) into the view as well?
    Q3 All the fields mentioned above are diaplay-only. So Can I create a control block which has all the fields from emp and project. Then populate them with my sql. The question is
    where I put this customerised sql so when user click excute query. My sql will run and display one the form?
    REally appreciated your help!
    Michael

  • Views for list web parts. Is there a way to allow users to change the view for a list web part without being redirected?

    Hi,
    I added a list view web part into a SharePoint 2013 page and it  is working as expected, except for one thing.
    I have enabled the option for the user to change the view for the web part. However when the user changes it, the user is redirected away from the page containing the web part, to the URL of the list itself.
    Is there a way to circumvent this issue so when the user selects a different view it updates the listing in the web part itself, rather than the user being redirected?
    Thanks in advance for the help.
    Regards,
    P.

    Hi,
    Please understand that one page can only display one view. You could find it out by observing the Address in browser when switching among different views for a list.
    If you would like to change the view of a list web part, you could go to web part propertites > Select view and configure it.
    In addition, here is a thread with similar requirement that might help:
    http://social.technet.microsoft.com/Forums/en-US/18dba190-5ee2-4b50-b005-1360d862f4ba/how-can-end-user-change-the-view-in-a-list-view-web-part?forum=sharepointgeneralprevious
    Regards,
    Rebecca Tu
    TechNet Community Support

  • :: NWA does not show table view for monitoring reports ::

    Hi,
    We are facing an issue in one of our portal system.
    I click on Portal index page, then I go to Net weaver Administrator --> Monitoring --> Java system reports.
    Here I get the resource utilization graphs.
    The graphs show proper values however when I click on table view it does not show any value or table at all.
    Then I click on Settings button, and click on Persistent radio button.
    It asks to enter the number of days for which the the data should be stored.
    I gave it as 2 days and click on Apply button.
    It shows a message saying "changes would be effective after restarting monitoring service".
    However when I go there i.e. NWA --> Administration --> Applications
    I get below services
    cafruntimemonitoring~ear                 
    com.sap.ip.bi.sdk.monitoring                 
    tclmwebadminmonitoravail~wd            
    tclmwebadminmonitorcomplib~wd            
    tclmwebadminmonitorprovider_ear            
    tclmwebadminmonitorstate~wd            
    tclmwebadminoverviewmonitoring~wd           
    tcmonitoringsysteminfo
    Would you kindly suggest which service from above list should be restarted ?
    Thank you, Regards,
    Girish Garje.

    I think what is being asked is "How do I expose a database view as a schema table in Configuration Manager?"
    This is accomplished by creating a database view within the WCC database schema (and with the WCC schema user as the view owner). The view then will appear as a table in the "table" tab in Configuration Manager.
    One caveat in 11g is that the user created by RCU does not have any privileges to read/create views in its own schema. You may need to grant privileges to views for the WCC schema user before this will work.

  • Changing the default view for Line Items in an Auction.

    Hello All,
    We have a version 5 client who is asking for us to change the default view for line items in an auction.
    Currently, if you have an auction setup, and you go to the Line Items tab, the default view is the "Basic View". The client would like to change the Default from "basic view" to "price view".
    Is there a way to change this default in the system? Can this be configured using query groups? Any information would be helpful.

    Hi wood cloud,
    This is not possible, bcz there is no VLV for that drop down and we cant set it  to the price view.
    Thanks,
    Ankur Goyal

  • Changing the default associated view for a related entity

    A question from a peer:
    Hey there
    Do you know how in CRM 2015 to change the default associated view for a related entity?
    Say you are in an Account and from the menu open the opportunities for that account.
    That new pop up window states “Opportunity Associated View” I want to change that to “My Custom View”
    I thought we covered this in class years back but cannot remember

    There are a few ways to get what you want, the easiest being
    Create a document as you want it for a particular site, save it is junk.php or similar and create a new file by saving as this as the proper document name such as index.php
    Use the Dreamweaver template system, i.e. create a template with a .dwt.php extension like template.dwt.php and use that to create new pages.
    There are other ways like creating your own php template system. But you can put that in the too hard basket.

  • How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files?

    How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files? I need to look at several thousand PDF files. It takes too long to open each one individually. The only thing I could think of is combining them into large groups and then using the Navigation index. But I like the way windows Picture and Fax Viewer does it because you can keep the files separate. Combining PDFs causes loss of individual file names. That would be a problem since I do need to have the individual file names.

    Windows Picture and Fax Viewer is a DLL and is started via a rundll32.exe call and can't be set as an application to handle images in Firefox 3 and later versions.
    Try to set Windows Picture and Fax Viewer as the default viewer in Windows, then it should be listed automatically in the Mozilla Firefox Browse dialog.
    *http://www.winhelponline.com/articles/115/1/Windows-Picture-and-Fax-Viewer-as-the-default-viewer-in-Mozilla-Firefox.html
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • TS1702 how can I get anyone to give us answer on the iphone apps casino game we purchased few days ago which once the token was finished we were not able to reset and play just for fun and not for gambling. we need help and not to be charged additional

    few days ago I have purchased Iphone casino games from itunes apps store. One of the game was made by the company called "ARISTOCRAT" dragan game. Usually we will get basic tokens to play the game, and if we ran out of the tokens all we need to do is going into "manu" and "setting" selete "dream" and reset that we should be able to continue play the game with same amount of the basic tokens. The one game would not let us to go back to the game. There were msg came out said" game center requires an active connection to the internet"? I didn't feel comfortable because we purchased the game for $1.99 to play for fun and not to gamble. We do have credit card on your file. We don't want to be charged alot of money for something not in our well. I need help to answer the question on the following:
    1.  Are we able to ever play this game again without going to internet? We don't even know which site to go to, because when we press the ok button nothing else came out to direct us to any area.
    2. We only purchased the few days ago order ID: MGT74GN6V7 on 10/03/12. all the other games we purchased we were able to continue to play by doing the same setting.
    Thank you for your help and looking forward to hear from you!

    You need to contact itunes support
    We are all itunes users just like you.
    http://www.apple.com/support/contact/

Maybe you are looking for

  • This.submitForm fails to download target document

    after some probs with certificate installation (http://www.adobeforums.com/webx/.59b87b22/3) I can now successfully submit form information via this.submitForm in a Linux (Ubuntu) environment. I had a problem where the following was displayed: "Canno

  • Having problems importing my .mov file.

    I am having problems importing several .mov files into iMovie. I also can't import .wmv files and I have been utterly confused. I know I have to convert the files but I don't want to pay for a program because I will only be converting 4 files. Please

  • Drop box set up

    How do you set up a drop box over the internet? Do you put the other persons dhcp address in the server address box under +connect to server?+

  • I am getting a runtime error r6034 with CS6 onloading.

    How do I resolve it?

  • Process in PA

    Hi all, Can anyone guide me how to check the existing process of SAP HR (PA)which client is using and then to suggest some value addition to the same. please suggest me few process how to start. Regards