How to smooth the Shape?

Hello all,
I made a MyCylinder Shape3D with TriangleArray.
I use every division=20. But I found it not smooth enough.
but the Class Cylinder(in com.sun.j3d.utils) to generate a
cylinder with the same division but it looks so smooth.
I review the resource code of the utils but haven't got the key!
may it need to setTexCoordinate?
Who can help me!
Thanks

may it need to setTexCoordinate?
No that is for placing images on the object. Handy if you wan't to make
Did you set the normals? These are used for calculation the shade.

Similar Messages

  • How to mask the shape of an eye ?

    Hi there,
    I am attempting to do werewolf effects, I want to make my nephew's eyes change color from blue to green to red .... while he is screaming shaking his head.
    I reckon I have to do rotoscoping & mask the out the shape of his eye, and move (& adjust) the mask for every frame.
    The problem is, how do I mask the odd shape of an eye ?
    Thanks

    RyanManUtd wrote:
    .. The problem is, how do I mask the odd shape of an eye ?
    .. when I made the, for Daddys mandatory StarWars movie with my son, I rotoscoped/keyframed an overlay to create the lightsabre .. hundreds of keyframes.. painstaking!
    in your case it is quite more complicated - not just a stick (=my son hold a wooden stick as 'guideline' for my drawings), but a 3D-distorted circle .. .-ish shape.
    I assume, using the Perspective/Basic 3D filter is way too much time-consuming (=to twist some grafical overlay...)
    I would:
    • export the sequence as 'Image sequence'
    • use any paint app to color the eyes in each frame
    • use QTpro to re-create a mov file for FCE..
    give feedback next year, how it come out!

  • How to change the shape of a RedLine dragging it with the mouse

    I need to change the shape of an existing RedLine with the mouse, dragging the nodes with the mouse.
    Any idea?

    http://java.sun.com/docs/books/tutorial/uiswing/
    http://today.java.net/pub/a/today/2006/09/12/how-to-write-custom-look-and-feel.html
    http://java.sun.com/docs/books/tutorial/2d/TOC.html
    http://java.sun.com/developer/Books/gui/swinghacks/?feed=JSC

  • How to change the shape of an Edit in FCP6

    Hi, i need to change the shape of the edit in FCP6 so it is not square, ie: grab each corner and drag to create a mis-shape, does anyone know how ?
    Thanks
    Paul

    Hi I tried distort but entering values rather than grab the handles in the corners is tricky, also not had much luck with the 4 point GM, i need to be able to distort the sq perspective and this the 4PGM seems just change the shape around it !!
    Unless I'm doing it wrong !
    Paul

  • Re: How to find the shape name after casting it to Shape3d

    Hi
    I have added some shapes made of quadarray. I have also implemented picking behaviour to highlight the shapes. All the shapes are similar.
    After picking I am acquiring the shape casting it to Shape3D using
    Shape3D shape = (Shape3D) pickResult.getNode(PickResult.SHAPE3D); But for some reason I am unable to get the name of the shape which I have set some where else. Did any one else face similar problem. If you were able to solve it how did you over come it.
    I am able to get the name with the variable representing the shape. I believe I am loosing the name during casting.
    I have tried overriding the setName() and getName() methods but as long as I am casting the shape to SHAPE3D I will still lose the name.
    Thanks in advance

    However since version 1.4 there is an easier way to extract that information from the Throwable:
    java.lang.Throwable
    public StackTraceElement[] getStackTrace()
    Provides programmatic access to the stack trace information printed by printStackTrace(). Returns an array of stack trace elements, each representing one stack frame.

  • How to find the shape change of a curve

    Dear All,
    I need to find the point where the curve got deviated. I Tried Calculating Slope It Is Not useful. Share Some Ideas to sort out this problem.
    Find the attached vi and the TDMS file read the file with default group name and let me know the result.
    Thanks and regards,
    Rams.
    Attachments:
    Test.vi ‏38 KB
    Testdata.zip ‏293 KB

    You don't define what you mean by "deviate". Deviate from what? From zero? From a straight line?
    Your curve has a couple of places where the slope changes, can you tell us which one you want?
    First is it horizontal, then
    starts sloping upward. (x=~1.0)
    changes in slope (x=~1.4)
    another change in slope (x=~1.9)
    In what way is calculating the slope "not useful"?
    LabVIEW Champion . Do more with less code and in less time .

  • Know how to change the outline shape of a tooltip?

    Hi All,
    I was wondering if anybody knows how to change the shape of a tooltip popup box?
    I've implemented my own UI delegate for ToolTipUI and overridden the paint( Graphics g, JComponent c ) method which I thought would have allowed me to completely control the rendering of the tooltip, box and all. But what I discovered was that even when I did nothing inside this method, the rectangular popup window was still appearing (I stepped through the code, and the correct instance of UI was being used, not the one that may have been defined by UIManager.set( "ToolTipUI", "foo.Bar" )) After a little more investigation, I ended up in ToolTipManager.showTipWindow() which eventually calls
    PopupFactory popupFactory = PopupFactory.getSharedInstance();
    tipWindow = popupFactory.getPopup(insideComponent, tip, location.x, location.y);
    tipWindow.show();To try to overcome this, as a test I extended JButton with the following constructor:
    public TestButton() {
        super();
        setUI( new MyCustomUI() );
        ToolTipManager.sharedInstance().unregisterComponent( this );
    }but this didn't solve the problem either. Has anybody got any ideas on this?
    Cheers,
    Paul.

    Try this.
    regards,
    Stas
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    public class Test {
        JScrollPane scroll;
        JPanel p=new JPanel(new BorderLayout());
        Robot robot=new Robot();
        public Test()  throws Exception {
            final JFrame frame=new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(p);
            JButton b=new JButton("Test balloon!");
            b.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    TransparentFrame frame1=new TransparentFrame();
                    int x=frame.getX()-100;
                    if (x<0) x=0;
                    int y=frame.getY()-100;
                    if (y<0) y=0;
                    frame1.setBounds(x,y,100,100);
                    frame1.createBalloon();
                    frame1.setVisible(true);
            frame.getContentPane().add(b);
            frame.setBounds(200,200,120,50);
            frame.show();
        public static void main(String[] args) throws Exception {
            new Test();
    class TransparentFrame extends JWindow {
        Robot robot;
        BufferedImage screenImg;
        Rectangle screenRect;
        MyPanel contentPanel=new MyPanel();
        boolean userActivate=false;
        Area Balloon;
        public TransparentFrame() {
            super();
            createScreenImage();
            contentPanel.Balloon=Balloon;
            this.setContentPane(contentPanel);
            this.addComponentListener(new ComponentAdapter() {
                public void componentHidden(ComponentEvent e) {}
                public void componentMoved(ComponentEvent e) {
                    resetUnderImg();
                    repaint();
                public void componentResized(ComponentEvent e) {
                    resetUnderImg();
                    repaint();
                public void componentShown(ComponentEvent e) {}
            this.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                public void windowClosed(WindowEvent e) {
                public void windowOpened(WindowEvent e) {
                public void windowIconified(WindowEvent e) {
                public void windowDeiconified(WindowEvent e) {
                public void windowActivated(WindowEvent e) {
                public void windowDeactivated(WindowEvent e) {
                    Balloon=null;
        protected void createScreenImage() {
            try {
                if (robot==null)
                    robot=new Robot();
            catch (AWTException ex) {
                ex.printStackTrace();
            Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
            screenRect=new Rectangle(0,0,screenSize.width,screenSize.height);
            screenImg=robot.createScreenCapture(screenRect);
        public void createBalloon() {
            Rectangle bounds=new Rectangle(0,0,getWidth(),getHeight());
            Balloon=new Area(new Rectangle(bounds));
            System.err.println(Balloon.getBounds());
            RoundRectangle2D content=new RoundRectangle2D.Double(0,0,getWidth(),getHeight()/3,20,20);
            Polygon polygon=new Polygon(new int[] {20,getWidth()/2,getWidth()},new int[] {getHeight()/3,getHeight()/3,getHeight()},3);
            Area a=new Area(new Rectangle(bounds));
            a.subtract(new Area(content));
            a.subtract(new Area(polygon));
            Balloon.subtract(a);
            contentPanel.Balloon=Balloon;
        public void resetUnderImg() {
            if (robot!=null && screenImg!=null) {
                Rectangle frameRect=getBounds();
                int x=frameRect.x;
                contentPanel.paintX=0;
                contentPanel.paintY=0;
                if (x<0) {
                    contentPanel.paintX=-x;
                    x=0;
                int y=frameRect.y;
                if (y<0) {
                    contentPanel.paintY=-y;
                    y=0;
                int w=frameRect.width;
                if (x+w>screenImg.getWidth())
                    w=screenImg.getWidth()-x;
                int h=frameRect.height;
                if (y+h>screenImg.getHeight())
                    h=screenImg.getHeight()-y;
                contentPanel.underFrameImg=screenImg.getSubimage(x,y,w,h);
    class MyPanel extends JPanel {
        BufferedImage underFrameImg;
        Area Balloon;
        int paintX=0;
        int paintY=0;
        public MyPanel() {
            super();
            setOpaque(true);
        public void paint(Graphics g) {
            super.paint(g);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.drawImage(underFrameImg,paintX,paintY,null);
            if (Balloon!=null) {
                g.setColor(Color.yellow);
                ((Graphics2D)g).fill(Balloon);
            g.setColor(Color.red);
            g.drawString("Balloon test!",10,20);
    }

  • How to smooth edges?

    Hi all,
    I am in hopes that someone can tell me how to smooth the edges of the numbers in the attached image?
    Thanks for any advice, hints. etc.

    Hi.
    Here's a little more food for thought.
    Noel and Paulo have offered good suggestions for getting very close to the desired result. But the characters might still need a little tweaking.
    Before I tweaked, I would convert the character to a vector path. And do my tweaking on the path. Refining the path should be fairly simple, and when you're done you have a character that can be scaled to your hearts content and it will be crisp.
    Taking Paulo or Noel's method as a starting point, Ctrl+Click on the layer thumbnail then Alt+Click on the "Make work path from selection" button at the bottom of the Paths pallet. In the pop up, select a Tolerance value. 1or 2 pixels if your character is small. Higher if it's larger. Experiment to get the best effect. You will now have an editable vector path. It needs to be edited.
    Then using the Direct Selection Tool (A)and the Pen Tool (P) you can perfect the letter. There is no drawing with the Pen Tool. Just adding and deleting points. Some points will have to be converted from corner to smooth and vice versa. Some will need to be moved a little. I selected the point or points then used the arrow keys to nudge them.
    Below is my finished vector path. As you can see, on this particular font most of the handles are vertical or horizontal. Part of what gives this font its characteristic shape. And it makes things a little easier. Once a point is in the right position, just hold down the Shift key while you drag the handle to adjust the curve. Mostly points will have to be deleted. The fewer the points the better. But no less than you need. They're cheap. (Caveat: Make sure you rename your work path. Otherwise, if you make a new path, you'll lose it.)
    Below, the path is rendered at 3 sizes, Huge, Large, and Actual Size of the screenshot. They are all crisp. Make it big as a barn and it will still be crisp.
    Anyway, if you're going to be fiddling around with fonts, I'd suggest you learn vectors if you don't know them already. The scalability is necessary. As Noel said, Ps is not ideal for this. But the vector tools in Ps are quite good enough to get you going. If you are comfortable with paths, you can convert the Magic Wand selection directly into a path and not refine it first as Noel and Paul suggested. That's what I did. It won't look as good as a converted selection modified by Noel or Paulo's method at first, but it may not be any harder to perfect.
    Once you have the path perfected, you may also convert the path into a Custom Shape. Then using the Shape Tool (U) you can drag and draw the shape to size. You can create a Shape Tool Library for the font. See the Help Files for details.
    Another note about this font. The circles at the end of some of the letters are really circles.You can use this to your advantage when tuning up the letters.
    That should be plenty to chew on top of what the others have already put on your plate.
    Peace,
    Lee

  • I need help with the shape matching of this image

    I am currently using NI Vision Assisstant to help me with the logic for the VI code. So currently I have 3 diagonal rectangles and I cannot figure out how to find the shape of each of them. Attached is a screenshot of the image I have. I have it going through a Luminosity filter and then a frequency filter and then I converted it to a binary image... now I am at this point: If anyone could help me find the rectangles... that would be greatly appreciated. I am sorry for such a basic quesiton.
    Thank you,
    Yousuf M. Soliman
    Attachments:
    Test.png ‏19 KB

    Hello Yousuf,
    There are quite a few functions that you might find useful for locating rectangles in a binarized image.  Possibilities include Shape Matching, Pattern Matching, Geometric Matching, Shape Detection, and more.  The difficulty that you will run into is the fact that your retangles are not straight edged, but are also not curved edges.  Many of the shape matching tools look for straight edges and right angles, which are not present in your image.  As such, it may be easiest to first use edge detecting tools to locate your edges, then use measurement tools to calculate area or distance.
    I played around with your image briefly, and was able to localize the edges to within an approximation.  I used the Clamp (Rake) tool to achieve the edge localization seen in the attached screen shots.  As you can see in ClampRect.png, the edge lines drawn aren't terribly accurate, but the other images show the points used, and with some playing around you should be able to find a better approximation of the rectangle edge.  Hope this helps!
    Patrick
    CLA
    Attachments:
    ClampRect.PNG ‏47 KB
    ClampLongEdge.PNG ‏55 KB
    ClampShortEdge.PNG ‏47 KB

  • Creating Objects with the Shape Tools | Learn Illustrator CS6 | Adobe TV

    In this video you'll see how to use Illustrator's shape tools to create primitive shapes that you can use as the basis for objects. You'll also learn how to use the Shape Builder tool to combine shapes.
    http://adobe.ly/JXWnRj

    What tool did you use to drag between the skull and jaw to join them?  You didn't share how you did that.

  • Altering the shape of pixels in illustrator

    Hello!
    I was wondering if anyone might be able to give me some advice on how to alter the shape of the pixels in an image to a custom pixel shape in illustrator.
    Thanks in advance.

    Wittyhearts,
    You asked:
    Is there anyway I might be able to do this without having to recolour each of the hearts?
    Yes, if you don't mind that the fill is pixel based.
    Follow Jacob's steps to create a grid of hearts on top of your image.
    Make sure that each heart is the size of the enlarged "pixel". (If you do this enlargement in Photoshop, use the Nearest Neighbour to get hard edges for each "pixel").
    Make sure that the Hearts grid is aligned with the large image Pixel grid.
    Fill the Hearts with Black. Select them all and Group them.
    Select both the Hearts and the picture below it and click Make Mask in the Transparency Panel. Check the Invert Mask option.
    This should be the result (I added black background).
    I just thought that it may be even better to convert the image fiirst to a vector mosaic: Object menu > Create Object Mosaic...
    Then create the Heart grid and make it a Mask.
    When you go to Object > Flatten Transparency and set the Raster/Vector slider to 100, you will get coloured heart shaped vectors

  • How to create a shape based on the shape of an image

    I want to erase a portion of a mask based on the shape of an image. how can i do this? btw how to create a circle? thx

    Both your questions leave room for imagining what you might really mean, but here's a shot at answering them.
    If you have a mask that you want to erase portions of based on an image... assuming the mask is a simple rectangle you drew with the rectangle tool, change the opacity of the rectangle's fill in the color panel to make it see-thru, place the mask over the image, and using the eraser tool, erase the portions of the mask that you do not intend to retain using the image below it as a guide.
    As for drawing a circle, hover over the rectangle tool and a menu should appear.  Select the oval/ellipse tool.  To draw a circle, hold down the shift key and draw just as you did for the rectangle.  The shift key forces it to retain equal width and height.

  • How do I take a photo and make it the shape of the object I choose, eg. oval, etc?

    How do I take a photo and make it the shape of the object I choose, eg. oval, etc?

    I am not in front of a Mac at the moment but believe it is:
    select the image > Menu > Format > Mask with shape > choose oval
    Peter

  • How to make type flow with the shape of an object?

    Hi there,
    I am a bit of an Illustrator newbie. I am needing some help to work out how to wrap or manipulate type to fit the shape and flow of an object? I have attached an image to show you what I am trying to do. I want the "shop by measure" text to be in the yellow blank space of the tape measure but flowing with the shape of the tape. Any help appreciated! Be gentle please lol.

    See online help. Read about Envelope Distortion. Then keep things simple as you experiment. This takes about 2 minutes.
    When doing "ribbon distortions," selecting corresponding top and bottom MeshPoints as pairs and moving/scaling/rotating them together helps avoid things getting all distorted out of control. See this PDF for an example. The example was done using a 1 Row, 2 Column Mesh.
    JET

  • How to make the APEX tree in the "Expand All" shape by default?

    Could anybody please enlighten me on how to make the APEX tree in the "Expand All" shape by default please? I created an APEX tree and by default it's in the "Collapse All" shape. I am using APEX 4.1.0.00.21

    Hi,
    you can check the view source of html and check the onclick code written on that plus sign(Expand All), just copy that onclick javascript code and put it on page javascript event.
    Thanks,
    Jaydip Bosamiya
    +91-76000 23053
    http://jbosamiya.blogspot.com

Maybe you are looking for

  • One solution to voice memo problem in iPhone 4

    Folks, I talked to Apple about the problem of not being able to retrieve voice memos in the utilities category of the iPhone 4, and got a fix. I'm not sure if everyone here is experiencing the same problem, but mine was that pressing the silver buton

  • How to calculate HD space needed

    I need to videotape a ceremony on Friday and show it very quickly afterwards. I have a new Canon XL2 cam, and I played around with capturing direct into iMovie 5 using the FW cable. My plan was to capture it this way live; at the end of the 90 min sa

  • With Windows XP, how do I remove bing from my browser page?

    I have tried all the standard methods but it is still on my monitor screen. It does not appear in my programs list in the "add-remove-programs" list. It is not listed in my add-on's list. It is not in my internet options, firefox mozilla is the home

  • Zen Vision:M Album Pict

    Hi all, I bought one of these a month or so ago and its great One thing that has been bugging me is that when I put my music on, there is an album cover of a "System of a Down" cover, I only have one or 2 songs from them and I cannot find any picture

  • QT export failing at 104 GB

    i'm exporting a quicktime from FCP- exporting at 10 bit uncompressed, 85 minute'sh project. twice it has crapped out at 104 G, which is about 80% complete (after several hours of exporting no less). can anyone help? THX!