Squares Drawing

0 views
Skip to first unread message

Sherley

unread,
Aug 5, 2024, 11:46:30 AM8/5/24
to wintamarle
EDITProblem solved!So I've been going through the official OpenGL ES 2 tutorials for Android, and I've gotten to the part that involves drawing shapes, but I can't seem to get a square to work. It draws a right triangle instead.

I've included the code that I'm using to define and draw the shape, which is copied almost exactly from the tutorial. The Renderer class simply creates an instance of this shape and calls the draw method.


For some reason, the tutorial does not give the values/declaration for vertexStride and vertexCount, so the ones I have in there are educated guesses. I've tried several values for vertexCount (1 thru 12), and none work.


I think your also missing the ModelViewProjection Matrix used to convert 3D space to 2D screen space. mvpMatrix should be passed in by the draw function draw(float[] mvpMatrix)Forgot to mention you also should use DrawElements(...) (used in example) if you do there's no need for the count or stride, just the length of an idicies array and a drawing buffer.


This array specifies the desired vertices of 2 triangles. 0, 1 and 2 for the first. Then 0, 2 and 3 for the second. GL_TRANGLE_FAN just happens to work because it will draw the next triangle using the first vertex in the buffer, the last vertex used in previous triangle and the next vertex. For the second triangle this is 0, 2 and 3. Then 0, 3 and 4, etc. Had vertex 2 been 5, 5 and vertex 3 been -5, 5, the resulting fan would not have been a square.


Hi Folks,



I have one of our engineers having an issue with their new HP ZBook 15 G2, I checked the AutoCAD recommended hardware and the HP Zbook 15 G2 is on the list, and I have applied the recommended 354.56 NVidia Quadro Driver according to the Certified Hardware page.


The first issue is an overall sluggishness when drawing, zooming etc, it just feels jittery and not smooth.



The second issue is the grey squares that appear when drawing over an image layer. I did see some articles in relation to Hardware Acceleration, we have tried setting Hardware Acceleration on, and also off as some suggested but this still did not make a difference.


I'm not sure about the lag time. But those look like artifacts in the display of the aerial photos. I've seen them but they usually disappear after I pan or zoom. What type of aerials are you using? Also does the lag persist if the aerials are detached?


Allen Jessup

CAD Manager - Designer

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Except for the Layer box this is what I've come to view as normal when working with Raster images. I ignore it until it's too distracting then pan a little or do a regen. As far as the Layers dialog box goes. I would update the graphics driver. See if that helps.


I've updated drivers, gone to older ones, and in the end kept to the recommended and tested NVidia driver version recommended by Autodesk for the Quadro card and no luck.



I'll chase around some other ZBook 15 users we have in our environment to see if they have the same issue or not.


One issue with my simple drawing tools is that, for the most part, the mark produced is uniform in width and color (one exception is a brush. The brush can be pushed into the surface to make a thicker mark or pulled out to leave a thinner one). It occurred to me that, already having the ability to determine the value (lightness or darkness) of any area of some reference image, I could draw a square spiral with more or fewer revolutions (I think of this quality as drawing a tighter or looser spiral) to communicate any given value.


My ShopBot CNC can, in two commands, draw nested rectangles of any dimension and offset. By offset, I mean the (the distance between each successive nested rectangle). The first command sets the offset and the second command draws the nested rectangles. So my first program accepted parameters from me at run-time (parameters included the location of the reference image, the dimensions of the drawing to be made, the size of the rectangles (in this program these were always square) to be drawn, the minimum offset (densest spiral) and off we go!


I'm inserting a border drawing as a block onto another drawing using INSERT. After the block is added several (4) white blocks show up in random locations, about .07 inches square. They look like selection points, but they are not on the original drawing. When I select one of them the entire border block is selected.


@pendeanThanks for the info. It's helpful. I used BEDIT to remove the hatches. It's a temporary fix though since I would like to reuse the underlying block. However, when I go to the acade_title block I don't see the hatches. Trying to do an area select comes up with nothing in the associated parts of the drawings. They are invisible and unselectable. Where do you think they are coming from? Attached is the original acade_title block.


I am finding it difficult to adjust the end positions of horizontal and vertical lines that I am drawing. I am constructing tree diagrams and I find that I always need to keep moving them around and making them longer or shorter.


I select a line and then try and drag one of the blue squares that appear at the end points of the line to the desired position. This is not easy. The point often appears not to move and when I release the mouse button, the point jumps to the wrong place, or backwards, or even to the page margin.


From my perspective, the larger square indicates the starting point and the smaller square indicates the end point of the line - just create a line from left to right (larger square is left) or from right to left (larger square is right). This is important to find which Arrow Styles (called Start style and End style) to change, if you need to add arrows to the start or to the end of the line.


To align correctly several connectors (to give the impression that all terminal segments come from a single wide horizontal line), take care that all all destination boxes have the same height (use F4 to access the properties and be able to force exact measures) and are all aligned so that their top border have the same coordinate (this is more important than the height itself). Adapt if your chart follows a perpendicular direction.


I have been learning to use QGIS for the last three days. I am graduating from importing shapefiles into Google Earth and I am now at the point where I need to go to the next level. I am in the oil and gas industry and I have three days invested into building my first map. I have been able to download most of the shapefiles from public databases, but I am deadlocked on how to manually draw a 550'X550' red hatched square and place it on my map. I have had to resort to drawing the square in Google Earth and opening the KMZ file in QGIS. Now I am having the issue of how to adjust its position on the map. The KMZs appear to be "grayed out" in my layers panel. Whereas the shapefile databases I have downloaded appear to be darker in the layers panel.


(1) Select one of the rectangle tools in the "shape digitizing toolbar", for example "Add Rectangle from 3 points"

(2) Draw the first point, then you can lock the distance to the next point with pressing "d" on the keyboard, then entering the value for the distance and press "Enter" -> the distance will be locked. Same procedure for the next point.


Create a square of the appropriate size using Menu Processing > Toolbox > Rectangles, ovals, diamonds. You need an input layer: just create a temporary scratch layer with one point (the square will be built around this point).


Triple pack of supersoft sensory muslin squares in high contrast black and white patterns. Designed to the millimeter to support babies' cognitive and visual development between birth and around four months.


Our products are designed using cutting edge research on how infants learn to see, what they can see as their vision develops and what they like to look at. We do this by working with our consultant Orthoptist and our scientific research partners at The Sussex Baby Lab.


Etta Loves products are designed to perfectly support your baby and give you a well-deserved moment of calm and enough time to finish a hot drink, take a long shower, eat lunch with both hands or simply take in the wonder of your new baby.


Please note that we will not be responsible for the cost of postage to re-send any items where the address was entered incorrectly. If you realise that you've made an error in entering any of your details please email he...@ettaloves.com asap and we will amend them for you providing your item hasn't already been fulfilled. If your item comes back to us because of an incorrect address we will have to charge to resend it out to you.


Canadian orders will be subject to import duties, which we are unable to calculate as we have no access to this information. The receiver is liable for any import duties or additional costs upon arrival into Canada.


When returning any items we recommend recorded post and retaining Proof of Postage. We do not accept responsibility for any items that are lost in transit, nor do we cover the cost of returning goods if they are not faulty.


You can return goods for any reason and at any time within 28 days of receipt for a full refund or exchange, providing that you contact us within 14 working days of receiving your order and that the goods are received by us in an unused, undamaged and saleable condition. We will only issue a refund for any original postage cost if the item is faulty.


These are now my go-to gift for new babies, after totally falling in love with the ones we were given for our own. The patterns are beautiful and genuinely captured the attention of our baby for minutes at a time. They come beautifully packaged and look fantastic, while not taking up loads of space - something which I was really grateful for as a new parent! They are also just as good at mopping up baby sick as their less stylish counterparts ?

3a8082e126
Reply all
Reply to author
Forward
0 new messages