30天速成绘画设计教程:零基础入门到精通

5星 · 超过95%的资源 需积分: 43 15 下载量 128 浏览量 更新于2024-07-23 收藏 8.58MB PDF 举报
"《You Can Draw in 30 Days》是一本面向初学者的英文版绘画教程,由Mark Kistler撰写,这本书在全球售出了超过50万册,深受读者喜爱。作者以其轻松愉快的教学方式,为读者提供了一个在一个月内掌握绘画基础的实用指南。这本书特别关注素描和设计,适合那些希望快速提升艺术技能,无论是否有任何绘画经验的人。 《Drawing in 3-D with Mark Kistler》是作者的另一部知名作品,表明他在三维绘画领域也有深厚造诣。这本书的特色在于它不仅教授基本的绘画技巧,还强调了实践与乐趣相结合的学习过程,让学习者在享受过程中逐渐提升画技。 在版权方面,本书受到法律保护,未经Da Capo Press出版社的书面许可,任何形式的复制、存储、传输都是违法的。该书的印刷和出版信息显示,它是在美国印制,隶属于Perseus Books Group,采用了11号字体Relay Light。 图书的版权日期为2011年,所有权利被保留。如果你对本书中的任何内容感兴趣,可以直接联系Da Capo Press获取进一步的信息或购买正版书籍,地址位于美国马萨诸塞州剑桥市。这本书对于希望在短时间内入门绘画并发展设计技能的人来说,是一份极具价值的资源,其目标是帮助读者在短短30天内实现从零基础到绘画高手的飞跃。"

帮我写出以下java代码:Add a class Bubble that extends Shape. The Bubble class has an instance variable called radius of type double that represents the radius of the bubble. The constructor of the Bubble class takes an x and a y as arguments, which represent the position of the new bubble. The radius of a new bubble is always 10 and never changes after that. The isVisible method indicates whether the bubble is currently visible inside a window of width w and height h (position (0, 0) is in the upper-left corner of the window). The bubble is considered visible if at least one pixel of the bubble is visible. Therefore a bubble might be visible even when its center is outside the window, as long as the edge of the bubble is still visible inside the window. The code of the isVisible method is a little bit complex, mostly because of the case where the center of the circle is just outside one of the corners of the window. So here is the code of the isVisible method, which you can directly copy-paste into your assignment: // Find the point (wx, wy) inside the window which is closest to the // center (x, y) of the circle. In other words, find the wx in the // interval [0, w - 1] which is closest to x, and find the wy in the // interval [0, h - 1] which is closest to y. // If the distance between (wx, wy) and (x, y) is less than the radius // of the circle (using Pythagoras's theorem) then at least part of // the circle is visible in the window. // Note: if the center of the circle is inside the window, then (wx, wy) // is the same as (x, y), and the distance is 0. public boolean isVisible(int w, int h) { double x = getX(); double y = getY(); double wx = (x < 0 ? 0 : (x > w - 1 ? w - 1 : x)); double wy = (y < 0 ? 0 : (y > h - 1 ? h - 1 : y)); double dx = wx - x; double dy = wy - y; return dx * dx + dy * dy <= radius * radius; } The isIn method indicates whether the point at coordinates (x, y) (which are the arguments of the method) is currently inside the bubble or not. The edge of the bubble counts as being inside of the bubble. HINT: use Pythagoras's theorem to compute the distance from the center of the bubble to the point (x, y). The draw method uses the graphics object g to draw the bubble. HINT: remember that the color of the graphics object g is changed in the draw method of the superclass of Bubble. Also add a testBubble method to test all your methods (including inherited methods, but excluding the isVisible method, which I provide, and excluding the draw method since it requires as argument a graphics object g that you

2023-05-22 上传